Bug 921621

Summary: Cannot dumpxml bond interface without '--inactive' flag
Product: [Fedora] Fedora Reporter: Martin Kletzander <mkletzan>
Component: netcfAssignee: Laine Stump <laine>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: berrange, bili, clalancette, crobinso, dallan, itamar, jforbes, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-08 14:17:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Martin Kletzander 2013-03-14 14:35:28 UTC
[root@f18 ~]# virsh iface-list --all
Name                 State      MAC Address
--------------------------------------------
bond0                inactive   00:00:00:00:00:00
lo                   active     00:00:00:00:00:00

[root@f18 ~]# virsh iface-dumpxml --inactive bond0
<interface type='bond' name='bond0'>
  <start mode='none'/>
  <protocol family='ipv4'>
    <dhcp/>
  </protocol>
  <bond>
    <interface type='ethernet' name='eth0'>
    </interface>
    <interface type='ethernet' name='eth1'>
    </interface>
  </bond>
</interface>

[root@f18 ~]# virsh iface-dumpxml bond0
error: XML error: bond interface misses the bond element

Comment 1 Laine Stump 2013-03-20 18:36:22 UTC
Apparently add_bond_info() in netcf is failing to get the slave interface names from the netlink cache. I'm fairly certain that worked at one time (since the code exists, and I surely tested it prior to push).

Comment 2 Cole Robinson 2013-12-16 19:49:03 UTC
Pretty sure this is still relevant in F20

Comment 3 Laine Stump 2014-05-08 14:17:22 UTC
Actually I missed the fact that the bond interface in the example is inactive. This is *really* the same thing as Bug 878394 (filed against RHEL7), a libvirt bug, which is fixed by the following upstream commit:

commit 7284c499e54e538fd0ab35a1f09e358f06fc23b0
Author: Laine Stump <laine@laine.org>
Date:   Mon Apr 7 15:32:00 2014 +0300

    interface: dump inactive xml when interface isn't active

I just checked and that commit was pulled into the v1.1.3-maint branch prior to 1.1.3.5, so it is already in the current libvirt in F20. It *isn't* in F19 yet (and will require commit 50f5468c960f4fe491399d5a495426e6cb6b41f1 and some conflict resolution if that's desired)