Bug 1344552
Summary: | Can't run virsh iface-edit on bonded NICs: internal error: could not get interface XML description: unspecified error | ||
---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | redhat2 <redhat2> |
Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | laine, rbalakri |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-06-10 23:37:03 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
redhat2@jeo.net
2016-06-10 02:47:42 UTC
Additional things tried: * Removing all comments from /etc/network/interfaces (did not work) * Running the following: s $virsh iface-dumpxml bond0 > /tmp/bond0.xml $virsh iface-define /tmp/bond0.xml Got errors: error: Failed to define interface from /tmp/bond0.xml error: XML error: could not get interface XML description: XML invalid - Expecting an element start, got nothing Unfortunately, even the author of the debian/ubuntu port of the netcf library (which is what handles the backend of this) doesn't regularly use debian or ubuntu. You may get a better response if you file a bug against the netcf package in the ubuntu bug system (launchpad.net). In the meantime, you might get better info about the error by saving the output of "ncftool dumpxml bond0 >/tmp/bond0.xml && ncftool define /tmp/bond0.xml". If this is successful, then rry editing /tmp/bond0.xml followed by "ncftool define /tmp/bond0.xml" again - this is essentially what is happening when you run virsh iface-edit. Thanks - ncftool was not installed, so I'm guessing something else was being called or some other underlying error? Installing ncftool made no difference in virsh errors or functionality. Running ncftool gave the following error: ncftool> dumpxml bond0 error: unspecified error Since this also affects netcf, I opened a ticket against the netcf package in the ubuntu bug system. https://bugs.launchpad.net/canonical-devices-system-image/+bug/1591249 Thanks again. ncftool is a commandline utility that is usually packaged separately from the netcf library and often not installed by default (e.g. "netcf-libs" for the libraries that libvirt uses, and "netcf" for the commandline utility). The difference between "virsh iface-dumpxml bond0" and "ncftool dumpxml bond0" is that the former shows the *state* of the interface, while the latter shows what is in its config. I'm guessing that "ncftool dumpxml --live" would be successful (and that "virsh iface-dumpxml bond0 --inactive" would fail). So it appears that the debian/ubuntu backend is not correctly parsing the interfaces file in the case of bonds (at least not in the axact format you have them) and that it's returning an error code without a corresponding log message set. > it appears that the debian/ubuntu backend is not correctly parsing the interfaces file in the case of bonds (at least not in the axact format you have them) and that it's returning an error code without a corresponding log message set.
I think you are correct:
I got ncftool to give a very similar dump to virsh's with --live
ncftool> dumpxml --live bond0
<?xml version="1.0"?>
<interface name="bond0" type="bond">
<link state="up" speed="2000"/>
<bond>
<interface name="eno1" type="ethernet">
<link state="up" speed="1000"/>
<mac address="REDACTED:1b:f4"/>
</interface>
<interface name="eno2" type="ethernet">
<link state="up" speed="1000"/>
<mac address="REDACTED:1b:f4"/>yy
</interface>
</bond>
<protocol family="ipv4">
<ip address="192.168.1.16" prefix="24"/>
</protocol>
<protocol family="ipv6">
<ip address="REDACTED:1bf4" prefix="64"/>
</protocol>
</interface>
The only differences being:
* single vs double quotes
* a prepending of "<?xml version="1.0"?>"
* order of xml elements
None of that should make a difference.
-----------
Running
$ncftool dumpxml --live bond0 > /tmp/bond0.xml
$ncftool define /tmp/bond0.xml
error: XML invalid
error: Expecting an element start, got nothing
----------------------
So yes - there's something in the backend which is bombing out on the processing of the XML. I guess you can close this ticket against libvirt as there's something deeper that's the cause.
Thanks again!
|