Red Hat Bugzilla – Bug 758590
domblklist will returen non zero value when everything is ok
Last modified: 2013-03-22 04:36:32 EDT
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:
Patch for upstream: http://www.redhat.com/archives/libvir-list/2011-November/msg01762.html
Alex, I've put this in POST, can you comment with the commit message?
Dave, thanks. commit d082e1b966231743a142cc355d5da4edbec4dc9a Author: Alex Jia <ajia@redhat.com> 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
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
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