1. 27 7月, 2018 20 次提交
  2. 26 7月, 2018 17 次提交
  3. 25 7月, 2018 3 次提交
    • D
      rpc: treat EADDRNOTAVAIL as non-fatal when listening · 2eb748d2
      Daniel P. Berrangé 提交于
      Consider creating a listener socket from a hostname that resolves to
      multiple addresses. It might be the case that the hostname resolves to
      both an IPv4 and IPv6 address because it is reachable over both
      protocols, but the IPv6 connectivity is provided off-host. In such a
      case no local NIC will have IPv6 and so bind() would fail with the
      EADDRNOTAVAIL errno. Thus it should be treated as non-fatal as long as
      at least one socket was succesfully bound.
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      2eb748d2
    • D
      socket: preserve real errno when socket/bind calls fail · f56eb726
      Daniel P. Berrangé 提交于
      When reporting socket/bind failures we want to ensure any fatal error
      reported is as accurate as possible. We'll prefer reporting a bind()
      errno over a socket() errno, because if socket() works but bind() fails
      that is a more significant event.
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      f56eb726
    • J
      qemu: Use the correct vm def on cold attach · 55ce6564
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1559867
      
      When attaching a device to the domain we need to be sure
      to use the correct domain definition (vm->def or vm->newDef)
      when calling virDomainDeviceDefParse because the post parse
      processing algorithms that may assign an address for the
      device will use whatever domain definition was passed in.
      
      Additionally, some devices (SCSI hostdev and SCSI disk) use
      algorithms that rely on knowing what already exists of the
      other type when generating the new device's address. Using
      the wrong VM definition could result in duplicated addresses.
      
      In the case of the bz, two hostdev's with no domain address
      provided were added to the running domain's config only.
      However, the parsing algorithm used the live domain in
      order to figure out the host device address resulting in
      the same address being used and a subsequent start failing
      due to duplicate address.
      
      Fix this by separating the checks/code into CONFIG and LIVE
      processing using the correct definition for each block and
      performing cleanup for both options as necessary.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      55ce6564