Bug 761347

Summary: Return value error on the function cmdDomIfGetLink
Product: Red Hat Enterprise Linux 6 Reporter: Alex Jia <ajia>
Component: libvirtAssignee: Alex Jia <ajia>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, dyuan, mshao, mzhan, rwu, veillard, wentao.ma, yupzhang, zhpeng
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:38:16 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 Alex Jia 2011-12-08 06:35:40 UTC
Description of problem:
Although finding interface with matching mac addr, the return is still '1'.

Version-Release number of selected component (if applicable):
libvirt-0.9.8-0rc2.el6.x86_64

How reproducible:
always.

Steps to Reproduce:
1. virsh domif-getlink <guest name> <interface mac>
2. echo $?
  
Actual results:
# virsh domif-getlink vr-rhel6u2-x86_64-kvm 52:54:00:2f:c4:5d
52:54:00:2f:c4:5d default

# echo $?
1


Expected results:
return 0 when the result is right.

Additional info:

Comment 1 Alex Jia 2011-12-08 06:37:17 UTC
Patch for upstream:

https://www.redhat.com/archives/libvir-list/2011-December/msg00378.html

Comment 2 Alex Jia 2011-12-09 14:54:35 UTC
Patch has been ACKed and pushed on upstream.

commit 623562964867a4e1927cacb97aa895219e02ccfc
Author: Peter Krempa <pkrempa>
Date:   Thu Dec 8 10:09:59 2011 +0100

    virsh: return correct value from cmdDomIfGetLink
    
    Reported by Alex Jia <ajia>. Function cmdDomIfGetLink did not
    set a success return value on success path.
    
    Signed-off-by: Alex Jia<ajia>

Comment 3 zhpeng 2011-12-13 10:03:26 UTC
I test with libvirt-0.9.8-1.el6.x86_64, the same issue.

Comment 5 xhu 2012-01-10 08:24:24 UTC
Roproduce it with libvirt-0.9.8-0rc2.el6.x86_64.
Verify it with libvirt-0.9.9-1.el6 and it passed.

Comment 7 errata-xmlrpc 2012-06-20 06:38:16 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