| Summary: | 'XML error: bond interface misses the bond element' when try to stop a bond through command. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Geyang Kong <gkong> | ||||
| Component: | libvirt | Assignee: | Laine Stump <laine> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | unspecified | CC: | acathrow, cwei, jwu, laine, mjenner, mzhan, tzheng, ydu, zpeng | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-08-13 21:22:13 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Geyang Kong
2012-02-02 07:40:35 UTC
Created attachment 559000 [details]
This is libvirtd's log
libvirt is asking netcf for the live status of the bond. The live status currently only returns IP/MAC address configuration, not info about enslaved devices, so there is no <bond> element, but libvirt's parser is written to require a <bond> element. Either netcf needs to be enhanced to provide the <bond> element in a status dump, or libvirt needs to make it optional. Among other places, this was also reported in Bug 878394 (RHEL7 libvirt) Bug 786694 (RHEL6 virt-manager) Bug 1057964 (RHEL7 netcf) This was fixed with the following upstream commit: commit 7284c499e54e538fd0ab35a1f09e358f06fc23b0 Author: Laine Stump <laine> Date: Mon Apr 7 15:32:00 2014 +0300 interface: dump inactive xml when interface isn't active Other drivers in libvirt (e.g. network, qemu) will automatically return the "inactive" (persistent configuration) XML of an object when that object is inactive. The netcf backend of the interface driver would always try to return the live status XML of the interface, even when it was down. Although netcf does return valid XML in that case, for bond interfaces it is missing almost all of its content, including the <bond> subelement itself, leading to this error message from "virsh iface-dumpxml" of a bond interface that is inactive: error: XML error: bond interface misses the bond element (this is because libvirt's validation of the XML returned by netcf always requires a <bond> element be present). This patch modifies the interface driver netcf backend to check if the interface is inactive, and in that case always return the inactive XML (which will always have a <bond> element, thus eliminating the error message, as well as making operation more in line with other drivers. |