Bug 1095774
Summary: | virsh iface-dumpxml or virt-manager reports "bond interface misses the bond element" for inactive bond interfaces | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Laine Stump <laine> |
Component: | libvirt | Assignee: | Laine Stump <laine> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.5 | CC: | ajia, cwei, dyuan, gsun, juzhou, laine, mprivozn, mzhan, rbalakri, zhwang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.10.2-36.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 878394 | Environment: | |
Last Closed: | 2014-10-14 04:21:48 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Laine Stump
2014-05-08 13:41:46 UTC
When backporting to RHEL6, the following patch is also required to avoid writing new code: commit 50f5468c960f4fe491399d5a495426e6cb6b41f1 Author: Michal Privoznik <mprivozn> Date: Tue Dec 10 18:56:57 2013 +0100 interface: Introduce netcfInterfaceObjIsActive This function barely wraps ncf_if_status() and error handling code. Enviroment: host with 1 ethernet is ok. I can reporduce it on below version,detail steps as below. version: libvirt-0.10.2-35.el6.x86_64 netcf-0.2.4-1.el6.x86_64 1. Prepare the following xml: # cat bond3.xml <interface type='bond' name='bond3'> <start mode='none'/> <protocol family='ipv4'> <dhcp/> </protocol> <bond> <interface type='ethernet' name='eth0'> </interface> </bond> </interface> 2. Define and start new bond3. # virsh iface-define bond3.xml Interface bond3 defined from bond3.xml # virsh iface-start bond3 Interface bond3 started # virsh iface-list --all Name State MAC Address -------------------------------------------- bond3 active 18:03:73:bc:d1:7b lo active 00:00:00:00:00:00 3. Check the interface information # virsh iface-dumpxml bond3 --inactive <interface type='bond' name='bond3'> <start mode='none'/> <protocol family='ipv4'> <dhcp/> </protocol> <bond> <interface type='ethernet' name='eth0'> </interface> </bond> </interface> 4. Destroy the bond3 interface # virsh iface-destroy bond3 Interface bond3 destroyed # virsh iface-list --all Name State MAC Address -------------------------------------------- bond3 inactive 00:00:00:00:00:00 lo active 00:00:00:00:00:00 # virsh iface-dumpxml bond3 error: XML error: bond interface misses the bond element But I can not reproduce it on the new version, verify the bug as below: Version: netcf-0.2.4-1.el6.x86_64 libvirt-0.10.2-36.el6.x86_64 1. Repeate step 1,2,and 3 as above. 2. Destroy the bond3 interface # virsh iface-destroy bond3 Interface bond3 destroyed # virsh iface-list --all Name State MAC Address -------------------------------------------- bond3 inactive 00:00:00:00:00:00 lo active 00:00:00:00:00:00 3. Check the iface-dumpxml file. # virsh iface-dumpxml bond3 <interface type='bond' name='bond3'> <start mode='none'/> <protocol family='ipv4'> <dhcp/> </protocol> <bond> <interface type='ethernet' name='eth0'> </interface> </bond> </interface> can dump an inactive interface successfully without no error. With "virt-manager" it also works well as following steps: 1. Make sure NetworkManager is stopped # service NetworkManager stop 2. #virt-manager --debug -> Edit -> Connection details -> Network Interface -> "+"(Add) -> "Interface type"-> "Bond" -> Forward 3. Configure the bond like this: Start mode: none Active now: check on IP setting: IPv4: DHCP Choose interfaces to bond: eth0. Click "Finish" with no error. 4. bond0 can be stopped and deleted with no error "bond interface misses the bond element" showed. 2014-05-23 15:47:03,267 (Interface:237): Creating interface 'bond0' with xml: <interface type='bond' name='bond0'> <start mode='none'/> <protocol family='ipv4'> <dhcp/> </protocol> <bond> <interface type='ethernet' name='eth0'> <mac address='18:03:73:bc:d1:7b'/> <protocol family='ipv4'> <ip address='10.66.5.15' prefix='22'/> </protocol> <protocol family='ipv6'> <ip address='fe80::1a03:73ff:febc:d17b' prefix='64'/> </protocol> </interface> </bond> </interface> 2014-05-23 15:47:04,891 (engine:426): Tick is slow, not running at requested rate. 2014-05-23 15:47:11,324 (createinterface:1147): Install completed 2014-05-23 15:47:21,259 (host:909): Stopping interface 'bond0' 2014-05-23 15:47:24,711 (host:939): Deleting interface 'bond0' see above steps, move to verified. 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/RHBA-2014-1374.html |