1. 30 7月, 2018 1 次提交
  2. 27 7月, 2018 1 次提交
  3. 26 7月, 2018 2 次提交
  4. 25 7月, 2018 3 次提交
    • 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
    • S
      network: Use 'switch' control statement with virNetworkForwardType enum · 7564daca
      Shi Lei 提交于
      With 'switch' we can utilize the compile time enum checks which we can't
      rely on with plain 'if' conditions.
      Signed-off-by: NShi Lei <shilei.massclouds@gmx.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      7564daca
    • M
      qemuDomainSaveMemory: Don't enforce dynamicOwnership · 8c8c3233
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1589115
      
      When doing a memory snapshot qemuOpenFile() is used. This means
      that the file where memory is saved is firstly attempted to be
      created under root:root (because that's what libvirtd is running
      under) and if this fails the second attempt is done under
      domain's uid:gid. This does not make much sense - qemu is given
      opened FD so it does not need to access the file. Moreover, if
      dynamicOwnership is set in qemu.conf and the file lives on a
      squashed NFS this is deadly combination and very likely to fail.
      
      The fix consists of using:
      
        qemuOpenFileAs(fallback_uid = cfg->user,
                       fallback_gid = cfg->group,
                       dynamicOwnership = false)
      
      In other words, dynamicOwnership is turned off for memory
      snapshot (chown() will still be attempted if the file does not
      live on NFS) and instead of using domain DAC label, configured
      user:group is set as fallback.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      8c8c3233
  5. 24 7月, 2018 1 次提交
  6. 23 7月, 2018 1 次提交
    • A
      src: Make virStr*cpy*() functions return an int · 6c0d0210
      Andrea Bolognani 提交于
      Currently, the functions return a pointer to the
      destination buffer on success or NULL on failure.
      
      Not only does this kind of error handling look quite
      alien in the context of libvirt, where most functions
      return zero on success and a negative int on failure,
      but it's also somewhat pointless because unless there's
      been a failure the returned pointer will be the same
      one passed in by the user, thus offering no additional
      value.
      
      Change the functions so that they return an int
      instead.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      6c0d0210
  7. 20 7月, 2018 27 次提交
  8. 19 7月, 2018 4 次提交