Bug 758590 - domblklist will returen non zero value when everything is ok
Summary: domblklist will returen non zero value when everything is ok
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Alex Jia
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-30 07:09 UTC by weizhang
Modified: 2013-03-22 08:36 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 06:37:22 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-11-30 07:09:35 UTC
Description of problem:
virsh command domblklist will return 1 when do
# virsh domblklist kvm-rhel6u2-x86_64
Target     Source
------------------------------------------------
hda        /var/lib/libvirt/images/kvm-rhel6u2-x86_64.img

# echo $?
1
but seems that everything is ok and no error report 

Version-Release number of selected component (if applicable):
libvirt-0.9.4-23.el6.x86_64
kernel-2.6.32-220.el6.x86_64
qemu-kvm-0.12.1.2-2.209.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. # virsh domblklist guest
2. # echo $?

  
Actual results:
return 1

Expected results:
return 0

Additional info:

Comment 2 Alex Jia 2011-11-30 08:26:00 UTC
Patch for upstream:
http://www.redhat.com/archives/libvir-list/2011-November/msg01762.html

Comment 3 Dave Allan 2011-11-30 18:41:23 UTC
Alex, I've put this in POST, can you comment with the commit message?

Comment 4 Alex Jia 2011-12-01 02:30:56 UTC
Dave, thanks.

commit d082e1b966231743a142cc355d5da4edbec4dc9a
Author: Alex Jia <ajia>
Date:   Wed Nov 30 16:25:07 2011 +0800

    virsh: correct return value error
    
    Fix cmdDomblklist to return 'true' on success instead of '0'
    
    https://bugzilla.redhat.com/show_bug.cgi?id=758590

Comment 6 Min Zhan 2012-01-10 07:32:12 UTC
Reproduce this bug with libvirt-0.9.4-23.el6.x86_64.

Verified this bug with libvirt-0.9.9-1.el6 with below steps:

Steps:
# virsh domblklist rhel62
Target     Source
------------------------------------------------
hda        /var/lib/libvirt/images/rhel62.img

# echo $?
0

Comment 8 errata-xmlrpc 2012-06-20 06:37:22 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.