Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 769251 - blockresize lack of "free lock" after given wrong parameter
blockresize lack of "free lock" after given wrong parameter
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
x86_64 Linux
high Severity medium
: rc
: ---
Assigned To: Osier Yang
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-20 06:24 EST by weizhang
Modified: 2012-06-20 02:39 EDT (History)
10 users (show)

See Also:
Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:39:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 15:31:38 EDT

  None (edit)
Description weizhang 2011-12-20 06:24:37 EST
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-20 21:23:17 EST
patch comitted, move to POST.
Comment 4 Daniel Veillard 2012-01-09 04:38:06 EST
Upstream commit 33eca17f6ae163014aac6fee75175b16ef2e54f2

Daniel
Comment 6 min zhan 2012-01-10 02:54:43 EST
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 03:23:38 EDT
    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 02:39:30 EDT
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.