Bug 758590

Summary: domblklist will returen non zero value when everything is ok
Product: Red Hat Enterprise Linux 6 Reporter: weizhang <weizhan>
Component: libvirtAssignee: Alex Jia <ajia>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: acathrow, ajia, dallan, dyuan, mzhan, rwu, veillard, wentao.ma, yupzhang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.9.9-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 06:37:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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