virt-manager after upgrade: Error polling connection 'qemu:///system': internal error: could not get interface XML description: File operation failed - Failed to read (null)

Bug #1481295 reported by Fernando Fernandez
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
netcf (Ubuntu)
Fix Released
High
Unassigned
Vivid
Fix Released
High
Unassigned
Wily
Fix Released
High
Unassigned
Xenial
Fix Released
High
Unassigned
virt-manager (Ubuntu)
Fix Released
High
Unassigned
Vivid
Confirmed
High
Unassigned
Wily
Triaged
High
Unassigned
Xenial
Fix Released
High
Unassigned

Bug Description

==========================
Impact: virt-manager fails to start
Upstream fix: do not fail when /sys/class/net/$alias/ does not exist
Development fix: cherrypick of the original patch.
Regression potential: the patch did need some porting, so if that was not done right we could get a regression during netcf or libvirt
Test case:
 cat .> /etc/network/interfaces << EOF
iface eth0:1 inet static
  address 192.168.1.1
  netmask 255.255.255.0
EOF
 virsh iface-dumpxml eth0:1
 The virsh command should succeed and show something like
<interface type='ethernet' name='eth0:1'>
</interface>

==========================

I upgraded my machine to vivid some weeks ago and never tested this VM I had working before.

When I try to use the virt-manager, it shows an error:
Error polling connection 'qemu:///system': internal error: could not get interface XML description: File operation failed - Failed to read (null)

Ubuntu 15.04

virt-manager:
  Installed: 1:1.0.1-5ubuntu1
  Candidate: 1:1.0.1-5ubuntu1
  Version table:
 *** 1:1.0.1-5ubuntu1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages
        100 /var/lib/dpkg/status

Expected: to keep working as before
Instead: can't list and run installed VMs

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: virt-manager 1:1.0.1-5ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-25.26-generic 3.19.8-ckt2
Uname: Linux 3.19.0-25-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Aug 4 11:39:39 2015
InstallationDate: Installed on 2014-09-07 (330 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
PackageArchitecture: all
SourcePackage: virt-manager
UpgradeStatus: Upgraded to vivid on 2015-07-13 (22 days ago)

Revision history for this message
Fernando Fernandez (ferdez) wrote :
Revision history for this message
Fernando Fernandez (ferdez) wrote :

 Just to add that the VM domain can be successfully started by hand, with the "virsh start" command and I can use it with the virt-viewer command.

Revision history for this message
Thomas Bruno (tebruno99) wrote :

I am receiving the same error on a fresh install of Ubuntu Wily. Cannot get any version of virt-manager 1:1.0.1-5ubuntu2 or hand built virt-manager 1.2.1 to connect with the same error.

Screenshot included

Revision history for this message
Thomas Bruno (tebruno99) wrote :
Revision history for this message
Thomas Bruno (tebruno99) wrote :

Putthing this in debian/patch/fix-virtmanager and adding fix-virtmanager to debian/patch/series solved this issue:

diff --git a/src/dutil_linux.c b/src/dutil_linux.c
index a3b0176..5d69d19 100644
--- a/src/dutil_linux.c
+++ b/src/dutil_linux.c
@@ -1041,7 +1041,14 @@ static void add_link_info(struct netcf *ncf,
     ERR_NOMEM(!path, ncf);
     state = read_file(path, &length);
     FREE(path);
- ERR_THROW_STRERROR(!state, ncf, EFILE, "Failed to read %s", path);
+ if (!state) {
+ /* missing operstate is *not* an error. It could be due to an
+ * alias interface, which has not entry in /sys/class/net at
+ * all, for example.
+ */
+ state = strdup("");
+ ERR_NOMEM(!state, ncf);
+ }
     if ((nl = strchr(state, '\n')))
         *nl = 0;
     prop = xmlSetProp(link_node, BAD_CAST "state", BAD_CAST state);

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1481295] Re: virt-manager after upgrade: Error polling connection 'qemu:///system': internal error: could not get interface XML description: File operation failed - Failed to read (null)

Thanks! In that case that should be fixed as soon as we sync the new
0.2.8-1 from unstable into x. Then we can sru the patch itself.

Changed in netcf (Ubuntu Wily):
status: New → Triaged
Changed in netcf (Ubuntu Xenial):
status: New → Triaged
Changed in virt-manager (Ubuntu Wily):
status: New → Triaged
Changed in virt-manager (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → High
Changed in virt-manager (Ubuntu Wily):
importance: Undecided → High
Changed in netcf (Ubuntu Xenial):
importance: Undecided → High
Changed in netcf (Ubuntu Wily):
importance: Undecided → High
Changed in netcf (Ubuntu Xenial):
status: Triaged → Fix Released
Changed in virt-manager (Ubuntu Xenial):
status: Triaged → Fix Released
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I'm trying to come up with a brief test case to SRU this to wily, but
i don't seem to get an error when I do:

sudo ifconfig eth0:0 192.168.99.1 up
sudo ncftool list
sudo ncftool dumpxml eth0:0

Or, at least, no different results than with the patch applied. Can you
show

ifconfig -a

output for the system where you are having this error?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@ferdez,

are you able to provide the information requested in comment #7?

Revision history for this message
Fernando Fernandez (ferdez) wrote :

I thought this was resolved with some update, since it started working some weeks ago. But from these comments I understand that it isn't. :-)

I remembered that I used to have an eth0:1 interface and just tried it again. The problem returns when the interface eth0:1 is up.

The ifconfig -a output is:

eth0 Link encap:Ethernet HWaddr 20:1a:06:c4:5c:fe
          inet addr:10.10.1.6 Bcast:10.10.1.255 Mask:255.255.255.0
          inet6 addr: fe80::221a:6ff:fec4:5cfe/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:689886 errors:0 dropped:0 overruns:0 frame:0
          TX packets:568178 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:98201367 (98.2 MB) TX bytes:205841876 (205.8 MB)

eth0:1 Link encap:Ethernet HWaddr 20:1a:06:c4:5c:fe
          inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:65536 Metric:1
          RX packets:90302 errors:0 dropped:0 overruns:0 frame:0
          TX packets:90302 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:31371759 (31.3 MB) TX bytes:31371759 (31.3 MB)

virbr0 Link encap:Ethernet HWaddr 52:54:00:4f:b5:a2
          inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

virbr0-nic Link encap:Ethernet HWaddr 52:54:00:4f:b5:a2
          BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr fc:f8:ae:c7:e3:09
          inet addr:10.10.1.6 Bcast:10.10.1.255 Mask:255.255.255.0
          inet6 addr: fe80::fef8:aeff:fec7:e309/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:148162 errors:0 dropped:0 overruns:0 frame:0
          TX packets:69892 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:32732409 (32.7 MB) TX bytes:26769426 (26.7 MB)

Revision history for this message
Fernando Fernandez (ferdez) wrote :

Correction: the problem returns when the interface is *defined* in /etc/network/interfaces like this:

iface eth0:1 inet static
            address 192.168.1.1
            netmask 255.255.255.0

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

D'oh, that makes sense. I'll try again with that - thanks.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Ok, thanks. so ncftool dumpxml actually stil works, but
virsh iface-dumpxml fails. It is fixed in x (i can now test
that :), so we just need to SRU that patch to t,v,w.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Actually trusty is not affected

Changed in netcf (Ubuntu Vivid):
importance: Undecided → High
Changed in virt-manager (Ubuntu Vivid):
importance: Undecided → High
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netcf (Ubuntu Vivid):
status: New → Confirmed
Changed in virt-manager (Ubuntu Vivid):
status: New → Confirmed
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Fernando, or anyone else affected,

Accepted netcf into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netcf/1:0.2.6-1ubuntu0.15.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in netcf (Ubuntu Vivid):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in netcf (Ubuntu Wily):
status: Triaged → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Fernando, or anyone else affected,

Accepted netcf into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netcf/1:0.2.6-1ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : [netcf/wily] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for wily for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Succeeded here on wily.

tags: added: verification-done
removed: verification-needed vivid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netcf - 1:0.2.6-1ubuntu2

---------------
netcf (1:0.2.6-1ubuntu2) wily; urgency=medium

  * Cherrypick upstream patch to avoid erroring out on aliases which have
    no /sys/class/net/ directory. (LP: #1481295)

 -- Serge Hallyn <email address hidden> Fri, 30 Oct 2015 14:17:29 -0500

Changed in netcf (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for netcf has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netcf - 1:0.2.6-1ubuntu0.15.04.1

---------------
netcf (1:0.2.6-1ubuntu0.15.04.1) vivid-proposed; urgency=medium

  * Cherrypick upstream patch to avoid erroring out on aliases which have
    no /sys/class/net/ directory. (LP: #1481295)

 -- Serge Hallyn <email address hidden> Fri, 30 Oct 2015 14:04:13 -0500

Changed in netcf (Ubuntu Vivid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.