Merge ~paelzer/qa-regression-testing:fix-libvirt-artful-locking into qa-regression-testing:master
Proposed by
Christian Ehrhardt
Status: | Merged |
---|---|
Merged at revision: | 1b1d098bc5973e2fa6f7d348dd43b5c4d272182c |
Proposed branch: | ~paelzer/qa-regression-testing:fix-libvirt-artful-locking |
Merge into: | qa-regression-testing:master |
Diff against target: |
139 lines (+40/-5) 1 file modified
scripts/test-libvirt.py (+40/-5) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jamie Strandboge (community) | Approve | ||
Review via email:
|
Description of the change
Hi,
qemu 2.10 does the right thing to prevent data and metadata clobbering.
It locks image files, and without extra opt-in via special flags does not allow to open image files multiple times.
Some tests we have are currently affected as they attach a disk device.
Then skip to detach it but then attach it again.
Further the disk file gets re-written to be attached again.
All that is no more valid - but OTOH the reasons to skip the detach are gone as well.
So we can properly test the detach again and thereby automatically fix the attach without Failures.
To post a comment you must log in.
Without these fixes the libvirt tests on Artful run into the following issues:
FAIL: test_guest_ aa_attach_ detach_ physical (main.LibvirtTe stVirshSystemRo ot)
Test attach/detach physical libvirt. py", line 2304, in test_guest_ aa_attach_ detach_ physical cmd_and_ check(" attach- disk %s %s sdc --driver=%s" % (self.vm_name, device_disk, driver), check_aa_ files=True, tail=True, fn=device libvirt. py", line 1831, in _virsh_ cmd_and_ check virsh_cmd( self.qemu_ uri, args, None) libvirt. py", line 1740, in _run_virsh_cmd ls(expected, rc, result + str(report))
Traceback (most recent call last):
File "./test-
self._virsh_
_disk)
File "./test-
self._run_
File "./test-
self.assertEqua
AssertionError: Got exit code 1, expected 0
error: Failed to attach disk
error: internal error: unable to execute QEMU command 'device_add': Failed to get "write" lock
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= aa_attach_ detach_ physical (main.LibvirtTe stVirshSystemRo otAppArmor)
FAIL: test_guest_
Test attach/detach physical libvirt. py", line 2291, in test_guest_ aa_attach_ detach_ physical cmd_and_ check(" attach- device %s %s" % (self.vm_name, device_xml), check_aa_ files=True, tail=True, fn=device_disk) libvirt. py", line 1831, in _virsh_ cmd_and_ check virsh_cmd( self.qemu_ uri, args, None) libvirt. py", line 1740, in _run_virsh_cmd ls(expected, rc, result + str(report)) device. xml
Traceback (most recent call last):
File "./test-
self._virsh_
File "./test-
self._run_
File "./test-
self.assertEqua
AssertionError: Got exit code 1, expected 0
error: Failed to attach device from /tmp/tmpipVhxT/
error: internal error: unable to execute QEMU command 'device_add': Property 'scsi-hd.drive' can't find value 'drive-scsi0-0-0-1'
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= cb_attach_ detach_ virtio (main.LibvirtTe stVirshSystemRo otAppArmor)
FAIL: test_guest_
Test attach/detach virtio libvirt. py", line 2346, in test_guest_ cb_attach_ detach_ virtio cmd_and_ check(" attach- device %s %s" % (self.vm_name, device_xml), check_aa_ files=True, tail=True, fn=device_disk) libvirt. py", line 1831, in _virsh_ cmd_and_ check virsh_cmd( self.qemu_ uri, args, None) libvirt. py", line 1740, in _run_virsh_cmd ls(expected, rc, result + str(report)) device. xml blk-device. drive' can't find value 'drive- virtio- disk1'
Traceback (most recent call last):
File "./test-
self._virsh_
File "./test-
self._run_
File "./test-
self.assertEqua
AssertionError: Got exit code 1, expected 0
error: Failed to attach device from /tmp/tmpIdjdPR/
error: internal error: unable to execute QEMU command 'device_add': Property 'virtio-
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= aa_attach_ detach_ physical (main.LibvirtTe stVirshSystemNo nRootAppArmor)
FAIL: test_guest_
Test attach/detach physical libvirt. py", line 2291, in test_guest_ aa_attach_ detach_ physical cmd_and_ check(" attach- device %s %s" % (self.vm_name, device_xml), check_aa_ files=True, tail=True, fn=device_disk) libvirt. py", line 1831, in _virsh_ cmd_and_ check virsh_cmd( self.qemu_ uri, args, None) libvirt. py", line 1740, in _run_virsh_cmd ls(...
Traceback (most recent call last):
File "./test-
self._virsh_
File "./test-
self._run_
File "./test-
self.assertEqua