Red Hat Bugzilla – Bug 769251
blockresize lack of "free lock" after given wrong parameter
Last modified: 2012-06-20 02:39:30 EDT
Description of problem: When give wrong path for virsh command "blockresize", the domain lock can not be free Version-Release number of selected component (if applicable): qemu-kvm-0.12.1.2-2.211.el6.x86_64 kernel-2.6.32-223.el6.x86_64 libvirt-0.9.8-1.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. Prepare a guest with raw disk 2. # virsh blockresize kvm-rhel6u2-x86_64-new sda 2221225 error: Failed to resize block device 'sda' error: invalid argument: invalid path: sda 3. # virsh destroy kvm-rhel6u2-x86_64-new error: Failed to destroy domain kvm-rhel6u2-x86_64-new error: Timed out during operation: cannot acquire state change lock 4. # virsh start kvm-rhel6u2-x86_64-new error: Failed to start domain kvm-rhel6u2-x86_64-new error: Timed out during operation: cannot acquire state change lock Actual results: domain lock does not be freed when given wrong parameter on blockresize Expected results: blockresize can free domain lock when given wrong parameter Additional info:
https://www.redhat.com/archives/libvir-list/2011-December/msg00878.html
patch comitted, move to POST.
Upstream commit 33eca17f6ae163014aac6fee75175b16ef2e54f2 Daniel
Reproduce this bug with libvirt-0.9.8-1.el6.x86_64. Verified this bug with libvirt-0.9.9-1.el6: # rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.213.el6.x86_64 # uname -a Linux intel-w3520-12-1.englab.nay.redhat.com 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux Steps: 1. disk target is not sda, check guest can destroy and start successfully although parameter is wrong. # virsh list --all Id Name State ---------------------------------- 4 rhel62 running # virsh dumpxml rhel62 ... <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/rhel62.img'/> <target dev='hda' bus='ide'/> ... # virsh blockresize rhel62 sda 2221225 error: Failed to resize block device 'sda' error: invalid argument: invalid path: sda # virsh destroy rhel62 Domain rhel62 destroyed # virsh start rhel62 Domain rhel62 started 2. disk target is sda and check the command can take effect. # virsh dumpxml rhel62 ... <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/rhel62.img'/> <target dev='sda' bus='ide'/> ... # virsh blockresize rhel62 sda 2221225 Block device 'sda' is resized # virsh destroy rhel62 Domain rhel62 destroyed # virsh start rhel62 Domain rhel62 started
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No documentation needed
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-0748.html