libvirt should not use the MAC address assigned to tap devices/vnet interfaces by the TAP/TUN driver

Bug #579892 reported by Carlos Perelló Marín
54
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Fedora
Fix Released
High
libvirt (Ubuntu)
Fix Released
Low
Unassigned
Lucid
Won't Fix
Low
Serge Hallyn

Bug Description

On Ubuntu 10.04 I have problems using libvirt with a bridge because the TUN devices get random mac addresses and thus, change the bridge device mac address, which takes the lower mac addres of all devices attached to the bridge. The main and most critical problem is that, sometimes, we lose network connectivity for several seconds (usually 10-20 seconds) on the libvirt host and all its guests when a guest is powered off.

Searching for similar problems I found my problem described at https://bugzilla.redhat.com/show_bug.cgi?id=571991

=====================================================
SRU Justification:

1. Impact: Random loss of network connectivity on guest power on/off.

2. Fix: This bug was fixed upstream and in maverick, using the same patch
     (modulo porting0 which is added by the debdiff attached here. It
     forces libvirt to ensure that the bridge mac address is lower than
     that of any of its devices.

3. Patch: debdiff is attached.

4. Instructions: Power bridged guests on/off in libvirt, while continuously
      checking network connectivity to existing guests.

5. Regression: The patch itself should definately be safe, since it is
      ported from the fix in the redhat bug.
=====================================================

Revision history for this message
Mathias Gug (mathiaz) wrote :

Could you post the libvirt xml configuration of your guests and network?

Changed in libvirt (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Carlos Perelló Marín (carlos) wrote :

This is my network configuration:

auto br0
iface br0 inet dhcp
        bridge_ports eth0
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp off
        pre-up ifconfig eth0 hw ether 00:00:00:00:00:01

The macaddress change is the workaround I'm using right now so I'm able to avoid this issue.

The libvirt network configuration is disabled on this server, because I'm using the main bridge and I don't want it to do NAT.

Changed in libvirt (Ubuntu):
status: Incomplete → New
Changed in libvirt (Ubuntu):
status: New → Triaged
Changed in libvirt (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Sven 'Darkman' Michels (sven+launchpad) wrote :

Hi,

may i ask where the fix is? Its still in lucid and kills connectivity.

Regards,
Sven

Revision history for this message
Sven Müller (svenho) wrote :

Second that. This bug is very annoying..

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

This debdiff adds the patch which fixes this bug.

Changed in libvirt (Ubuntu):
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Sven and Sven,

sorry - a fix for this had been backported to lucid and tested, but
now I see that the bug it had been targeted to ended up being
invalidated, so that fix never ended up being SRU'd into lucid.

I'm doing that now.

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

(Before doing the final steps in SRU process, I want to upload this fix to a PPA
and test it one more time)

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

(Tested upgrade on lucid partition on my laptop)

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

If anyone has experienced this problem on Hardy, please chime in here. I had
a patch at https://launchpad.net/~serge-hallyn/+archive/libvirt-fix-macaddr?field.series_filter=hardy
which can be forward-ported if need be, but I've not heard anyone mention having this
bug on Hardy, so don't want to rock the boat needlessly.

Revision history for this message
Marcelo Fernandez (fernandezm) wrote :

@Serge, where is located that PPA with Lucid's libvirt package fixed, so I can test it too?

Do you know when this it's going to be SRU'd? It's been a lot of time since Lucid (LTS) is out and this bug is *very* annoying. :-/

Thanks

Revision history for this message
Marcelo Fernandez (fernandezm) wrote :

I have another question,

Putting "pre-up ifconfig eth0 hw ether 00:00:00:00:00:01" in the interfaces config file, like Carlos did, is a workaround to the bug?

Just to clarify :-)

Regards

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 579892] Re: libvirt should not use the MAC address assigned to tap devices/vnet interfaces by the TAP/TUN driver

Quoting Marcelo Fernandez (<email address hidden>):
> @Serge, where is located that PPA with Lucid's libvirt package fixed, so
> I can test it too?
>
> Do you know when this it's going to be SRU'd? It's been a lot of time
> since Lucid (LTS) is out and this bug is *very* annoying. :-/

Hi Marcelo,

It's at https://launchpad.net/~serge-hallyn/+archive/libvirt-mac2/+packages .
Please verify if it fixes the bug for you for lucid (I'm not allowed to
do it myself), then comment here. Even better, please feel free to
fill out the SRU justification at the top of the Bug Description as per
https://wiki.ubuntu.com/StableReleaseUpdates (Section 'Procedure').

Revision history for this message
Alex Tomlins (alex-tomlins) wrote :

Hi,

I couldn't install your package as there's already been an update released with that version number (0.7.5-5ubuntu27.8). I did however build a package from the debdiff referenced in comment #5, it's in my PPA (https://launchpad.net/~alex-tomlins/+archive/ppa).

This has fixed this issue for me on Lucid.

Changed in libvirt (Ubuntu Lucid):
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Serge Hallyn (serge-hallyn)
description: updated
tags: added: verification-needed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Marcelo,

regarding comment #11: it sure sounds like a good workaround. Have you been using it, and can you verify that it works for you?

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

(If answer to comment #14 is 'no', then I will reprioritize this bug to medium)

tags: added: verification-done
removed: verification-needed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Marked verification-done per Alex's confirmation.

Revision history for this message
Marcelo Fernandez (fernandezm) wrote :

@Serge,

Yes, I've using that suggestion (pre-up ....) in the /etc/network/interfaces file of the KVM Host, and the "interface freeze" problem disappeared since I added that line, a month ago.

I'd recommend to use it and check if it works for you too.

Regards,
Marcelo

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

As this has a workaround (in comment #11), making this low priority, I'm marking this wontfix for lucid.

Changed in libvirt (Ubuntu Lucid):
status: In Progress → Won't Fix
Changed in fedora:
importance: Unknown → High
status: Unknown → 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.