libvirt does not remove interfaces on stop

Bug #345485 reported by Jamin W. Collins
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Debian)
Won't Fix
Unknown
libvirt (Ubuntu)
Won't Fix
Low
Unassigned
Declined for Jaunty by Chuck Short
Lucid
Won't Fix
Low
Unassigned

Bug Description

Binary package hint: libvirt-bin

Stopping libvirt-bin no longer removes the virtual interfaces created by the daemon. The version of libvirt-bin in 8.10 did remove the created interfaces when the daemon was stopped.

$ ifconfig -a | grep vir
virbr0 Link encap:Ethernet HWaddr be:6a:67:2d:59:59
virbr1 Link encap:Ethernet HWaddr b2:90:28:78:6e:48
virbr2 Link encap:Ethernet HWaddr 8a:92:29:f2:4a:da
virbr3 Link encap:Ethernet HWaddr 1e:23:0b:29:57:11
$ sudo /etc/init.d/libvirt-bin stop
 * Stopping libvirt management daemon libvirtd [ OK ]
$ ifconfig -a | grep vir
virbr0 Link encap:Ethernet HWaddr be:6a:67:2d:59:59
virbr1 Link encap:Ethernet HWaddr b2:90:28:78:6e:48
virbr2 Link encap:Ethernet HWaddr 8a:92:29:f2:4a:da
virbr3 Link encap:Ethernet HWaddr 1e:23:0b:29:57:11

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia
Package: libvirt-bin 0.6.1-0ubuntu3
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
SourcePackage: libvirt
Uname: Linux 2.6.28-11-generic x86_64

Related branches

Revision history for this message
Jamin W. Collins (jcollins) wrote :
Revision history for this message
Jamin W. Collins (jcollins) wrote :

Any word on this? Jaunty is approaching release and this is a fairly annoying regression.

Revision history for this message
Jamin W. Collins (jcollins) wrote :

Is no one else seeing this behavior?

Revision history for this message
Chuck Short (zulcss) wrote :

I was still able to reproduce this problem on Karmic.

Regards
chuck

Changed in libvirt (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Jamin-

Can you reproduce this in Lucid?

I think this should be cleaned up by libvirt's upstart script.

Changed in libvirt (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Jamin W. Collins (jcollins) wrote :

Still present in up to date Lucid beta

$ ifconfig -a | grep vir
virbr0 Link encap:Ethernet HWaddr 5a:85:91:8b:65:30
$ sudo service libvirt-bin stop
libvirt-bin stop/waiting
$ ifconfig -a | grep vir
virbr0 Link encap:Ethernet HWaddr 5a:85:91:8b:65:30

Changed in libvirt (Ubuntu):
status: Incomplete → Confirmed
Changed in libvirt (Ubuntu Lucid):
status: Confirmed → In Progress
assignee: nobody → Dustin Kirkland (kirkland)
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.7.5-5ubuntu17

---------------
libvirt (0.7.5-5ubuntu17) lucid; urgency=low

  * debian/libvirt-bin.upstart: bring virbr0 up/down on upstart start/stop
    of libvirt, LP: #345485
 -- Dustin Kirkland <email address hidden> Thu, 01 Apr 2010 23:08:33 -0500

Changed in libvirt (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

I don't think this is correct the correct place to fix the bug; the name "virbr0" shouldn't be hardcoded in the upstart script and the command-line "ifconfig virbr0 start" is bogus anyway. For instance, I personally disable the virbr0 interface, but I could easily imagine people renaming it or having multiple ones.

This should be fixed in libvirtd itself instead; I'm not sure whether it is expected to bring down the networks on shutdown: if that's expected, then perhaps it can all the way and actually remove the interface as well, or it should at least bring up the interface again; I could also imagine it's expected NOT to touch the networks at all.

Revision history for this message
Jamin W. Collins (jcollins) wrote :

If it created the interface on it's startup, it should remove the interface on it's shutdown. Simple as that.

Revision history for this message
Loïc Minier (lool) wrote :

I don't think it's that obvious, it might have to preserve state across restarts for instance. Depends whether some vms are running and using the libvirt networks or not.

Revision history for this message
Jamin W. Collins (jcollins) wrote :

True, I'd forgotten that libvirt could be stopped and the VMs remain running.

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 345485] Re: libvirt does not remove interfaces on stop

Loic, agreed. I'm going to revert this upload.

:-Dustin

Changed in libvirt (Ubuntu Lucid):
status: Fix Released → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Uploaded a revert, in pending queue, should be approved after beta2 releases.

Changed in libvirt (Ubuntu Lucid):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.7.5-5ubuntu20

---------------
libvirt (0.7.5-5ubuntu20) lucid; urgency=low

  * debian/libvirt-bin.upstart:
    - remove unnecessary pid file existence test, LP: #510658
    - revert virbr0 up/down hack added in 0.7.5-5ubuntu17, LP: #345485
 -- Dustin Kirkland <email address hidden> Wed, 07 Apr 2010 15:39:39 -0500

Changed in libvirt (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

Moving back to Confirmed as the original fix was reverted

Changed in libvirt (Ubuntu Lucid):
status: Fix Released → Confirmed
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Unassigning myself, won't-fix for Lucid, as we don't yet have an agreed upon approach, and this bug is not release critical.

Changed in libvirt (Ubuntu Lucid):
assignee: Dustin Kirkland (kirkland) → nobody
status: Confirmed → Won't Fix
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

not sure if this should be a separate item or not, but as well as the interface it doesn't restart dnsmasq.

For anyone else trying to do that I believe the steps needed are:

  stop libvirt-bin
  killall dnsmasq (assuming you don't have another)
  ifconfig virbr0 down
  brctl delbr virbr0

now, if you start libvirt-bin it will restart dnsmasq

Dave

Revision history for this message
Olivier Berger (olivierberger) wrote :

Has anyone pushed this upstream ?

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

There is no agreed upon fix to push upstream. Near as I can tell, the consensus is in fact that libvirt is doing the right thing. That VMs can continue running when you stop or restart libvirt-bin, and therefore it would be wrong for libvirt to shut down its networking.

In which case I'd ask why this isn't marked 'Invalid' or 'Opinion'.

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

As per comment #10, I don't feel this bug is valid. Shutting down libvirt should not shut down interfaces as VMs may still be running.

Changed in libvirt (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Olivier Berger (olivierberger) wrote :

Hi. as I just mentioned in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657120 (same report, basically, but on Debian side/upstream-side), I think libvirt should shutdown virtual networks it started, when none of its managed VMs are still running.

It's not because it may be stopped while VMs are still there that it is always the case.

Hope this makes sense. My suggestion would be to reopen then... as you see fit.

Changed in libvirt (Debian):
status: Unknown → Won't Fix
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.