Bug 769251 - blockresize lack of "free lock" after given wrong parameter
Summary: blockresize lack of "free lock" after given wrong parameter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-20 11:24 UTC by weizhang
Modified: 2012-06-20 06:39 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed
Clone Of:
Environment:
Last Closed: 2012-06-20 06:39:30 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description weizhang 2011-12-20 11:24:37 UTC
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:

Comment 3 Osier Yang 2011-12-21 02:23:17 UTC
patch comitted, move to POST.

Comment 4 Daniel Veillard 2012-01-09 09:38:06 UTC
Upstream commit 33eca17f6ae163014aac6fee75175b16ef2e54f2

Daniel

Comment 6 Min Zhan 2012-01-10 07:54:43 UTC
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

Comment 7 Osier Yang 2012-05-04 07:23:38 UTC
    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

Comment 9 errata-xmlrpc 2012-06-20 06:39:30 UTC
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


Note You need to log in before you can comment on or make changes to this bug.