1. 20 3月, 2018 19 次提交
  2. 19 3月, 2018 7 次提交
    • C
      virt-aa-helper: resolve file symlinks · 77cd862f
      Christian Ehrhardt 提交于
      In a recent change b932ed69: "virt-aa-helper: resolve yet to be created
      paths" several cases with symlinks in paths were fixed, but it regressed
      cases where the file being last element of the path was the actual link.
      
      In the case of the last element being the symlink realpath can (and shall)
      be called on the full path that was passed.
      
      Examples would be zfs/lvm block devices like:
       <disk type='block' device='disk'>
          <driver name='qemu' type='raw'/>
          <source dev='/dev/mapper/testlvm-testvol1'/>
          <target dev='vdd' bus='virtio'/>
       </disk>
      With the target being:
       /dev/mapper/testlvm-testvol1 -> ../dm-0
      
      That currently is rendered as
       "/dev/mapper/testlvm-testvol1" rwk,
      but instead should be (and is with the fix):
       "/dev/dm-0" rwk,
      
      Fixes: b932ed69: "virt-aa-helper: resolve yet to be created paths"
      Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1756394Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
      77cd862f
    • C
      tools: fix variable scope in in check_guests_shutdown · 7e476356
      Christian Ehrhardt 提交于
      libvirt-guests.sh when run with more active guests than requested to
      shut down in parallel will run until it times out only shutting down
      the first set of guests.
      
      This patch fixes parallel shutdown by fixing a variable scope issue
      where check_guests_shutdown unintentionally reset $guests which
      prevented further progress.
      
      Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1688508Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
      7e476356
    • A
      python: Drop explicit version where possible · 677aaeb1
      Andrea Bolognani 提交于
      Some of our scripts are known to work both with Python 2 and
      Python 3, so for them we shouldn't be forcing any specific
      version of the interpreter when they're called directly; we
      always use $(PYTHON) explicitly in our build rules anyway.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      677aaeb1
    • E
      qemu: hostdev: Fix the error on VM start with an mdev when IOMMU is off · e02d102b
      Erik Skultety 提交于
      Commit b4c2ac8d made a false assumption that IOMMU support necessary
      for an mdev device to be assigned to a VM. Unlike direct PCI assignment,
      IOMMU support is not needed for mediated devices, as the physical parent
      device provides the isolation, therefore, simply checking for VFIO
      presence is enough to successfully start a VM.
      
      Luckily, this issue is not serious, since as of yet, libvirt mandates
      mdevs to be pre-created prior to a domain's launch - if it is,
      everything does work smoothly even with IOMMU disabled, because the
      parent device will ensure the iommu groups we try to access exist.
      However, if there are *no* IOMMU groups yet, thus no mdev exists yet, one
      would see the following error:
      
      "unsupported configuration: Mediated host device assignment requires VFIO
      support"
      
      The error msg above is simply wrong and doesn't even reflect the IOMMU
      reality, so after applying this patch one would rather see the following
      error in such case instead:
      
      "device not found: mediated device '<UUID>' not found"
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      e02d102b
    • E
      util: mdev: Improve the error msg on non-existent mdev prior to VM start · 3d2e4c3e
      Erik Skultety 提交于
      What one currently gets is:
      failed to read '/sys/bus/mdev/devices/<UUID>/mdev_type/device_api': No
      such file or directory
      
      This indicates that something is missing within the device's sysfs tree
      which likely might be not be the case here because the device simply
      doesn't exist yet. So, when creating our internal mdev obj, let's check
      whether the device exists first prior to trying to verify the
      user-provided model within domain XML.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      3d2e4c3e
    • M
      virNetlinkDumpCommand: Don't leak response buffer · 29d6bb70
      Michal Privoznik 提交于
      ==16451== 32,768 bytes in 2 blocks are definitely lost in loss record 1,007 of 1,013
      ==16451==    at 0x4C2AF0F: malloc (vg_replace_malloc.c:299)
      ==16451==    by 0x7CADB40: nl_recv (in /usr/lib64/libnl-3.so.200.23.0)
      ==16451==    by 0x532DFAC: virNetlinkDumpCommand (virnetlink.c:363)
      ==16451==    by 0x53236AE: virNetDevIPCheckIPv6Forwarding (virnetdevip.c:641)
      ==16451==    by 0xE3E4A1A: networkStartNetworkVirtual (bridge_driver.c:2490)
      ==16451==    by 0xE3E55F5: networkStartNetwork (bridge_driver.c:2832)
      ==16451==    by 0xE3DFFE5: networkAutostartConfig (bridge_driver.c:531)
      ==16451==    by 0x53F47E0: virNetworkObjListForEachHelper (virnetworkobj.c:1412)
      ==16451==    by 0x52FE69F: virHashForEach (virhash.c:606)
      ==16451==    by 0x53F4857: virNetworkObjListForEach (virnetworkobj.c:1439)
      ==16451==    by 0xE3E0BF4: networkStateAutoStart (bridge_driver.c:808)
      ==16451==    by 0x55689CE: virStateInitialize (libvirt.c:758)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      29d6bb70
    • A
      docs: Import print_function in reformat-news.py · 9671ecfe
      Andrea Bolognani 提交于
      The script already works perfectly fine with Python 2, but that's
      more by chance than by design: we have a single occurrence of
      print(), and it just so happens that its only argument is an
      expression. Importing print_function makes the script more future,
      err, past proof.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      9671ecfe
  3. 18 3月, 2018 1 次提交
  4. 17 3月, 2018 12 次提交
  5. 16 3月, 2018 1 次提交
    • M
      qemu: Build usb controller command line more wisely · b133fac3
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1552127
      
      When building command line for USB controllers we have to do more
      than just put controller's alias onto the command line. QEMU has
      concept of these joined USB controllers. For instance ehci and
      uhci controllers need to create the same USB bus. To achieve that
      the slave controller needs to refer the master controller. This
      worked until we've introduced user aliases because both master
      and slave had the same alias. With user aliases slave can have
      different alias than master. Therefore, when generating command
      line for slave we need to look up the master's alias.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b133fac3