If Libvirtd is restarted, libvirt drops active domains lose network interface info.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Fedora) |
Fix Released
|
Medium
|
|||
libvirt (Ubuntu) |
Fix Released
|
Low
|
Dave Walker | ||
Lucid |
Fix Released
|
Low
|
Dave Walker |
Bug Description
IMPACT: If libvirt daemon is restarted, it forgets about domain interfaces (breaking domifstat)
RESOLUTION: Check that the domain is inactive before wiping knowledge of it.
PATCH: Based on upstream commit, attached comment #6.
TEST CASE: (Based on Fedora bug report)
{{{
1. Start QEMU/KVM guest with: sudo virsh start vm01
2. restart libvirtd: sudo restart libvrtd
3. Get statistics with sudo virsh domifstat vm01 vnet0
Actual results:
$ sudo virsh domifstat vm01 vnet0
error: Failed to get interface stats vm01 vnet0
error: invalid argument in invalid path, 'vnet0' is not a known interface
Expected results:
$ sudo virsh domifstat vm01 vnet0
vnet0 rx_bytes 83980
vnet0 rx_packets 1612
vnet0 rx_errs 0
vnet0 rx_drop 0
vnet0 tx_bytes 3546
vnet0 tx_packets 15
vnet0 tx_errs 0
vnet0 tx_drop 0
}}}
REGRESSION POTENTIAL: This would seem to be low, the patch adds an extra conditional statement before wiping the domain network interface knowledge. The patch has been in upstream Git since 4/05/2010, and has had at least one upstream release and is also in Maverick.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: libvirt-bin 0.7.5-5ubuntu27.6
ProcVersionSign
Uname: Linux 2.6.32-23-server x86_64
Architecture: amd64
Date: Thu Oct 28 13:40:36 2010
InstallationMedia: Ubuntu-Server 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: libvirt
Changed in libvirt (Ubuntu): | |
importance: | Undecided → Low |
description: | updated |
Changed in libvirt (Ubuntu Lucid): | |
status: | New → Fix Committed |
assignee: | nobody → Dave Walker (davewalker) |
Changed in libvirt (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in libvirt (Ubuntu Lucid): | |
importance: | Undecided → Low |
tags: |
added: verification-done removed: verification-needed |
tags: | added: testcase |
Changed in libvirt (Fedora): | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Description of problem: aceStats do not work.
If I have QEMU/KVM guest started in libvirtd and then restart libvirtd, libvirtd no longer knows mapping between guests and tun devices on host and quering virDomainInterf
Version-Release number of selected component (if applicable): 0.7.1-15. fc12.x86_ 64)
libvirt version 0.7.1 (Fedora 12 rpm: libvirt-
also tested with Centos 5.4 and libvirt 0.6.3
How reproducible:
every time
Steps to Reproduce:
1. Start QEMU/KVM guest with: virsh start vm01
2. restart libvirtd: /sbin/service libvrtd restart
3. Get statistics with virsh domifstat vm01 vnet0
Actual results:
[root@kvm01 ~]# virsh domifstat vm01 vnet0
error: Failed to get interface stats vm01 vnet0
error: invalid argument in invalid path, 'vnet0' is not a known interface
Expected results:
[root@kvm01 ~]# virsh domifstat vm01 vnet0
vnet0 rx_bytes 83980
vnet0 rx_packets 1612
vnet0 rx_errs 0
vnet0 rx_drop 0
vnet0 tx_bytes 3546
vnet0 tx_packets 15
vnet0 tx_errs 0
vnet0 tx_drop 0
Additional info: '52:54: 00:28:59: 5c'/>
I found out that after libvirtd forgets mapping for virtual interfaces. Here are the output from virsh dumpxml vm01 before restart:
<interface type='network'>
<mac address=
<source network='default'/>
<target dev='vnet0'/>
<model type='virtio'/>
</interface>
and after restart of libvirtd: '52:54: 00:28:59: 5c'/>
<interface type='network'>
<mac address=
<source network='default'/>
<model type='virtio'/>
</interface>
the <target dev='vnet0'/> is missing.