From b684d651f540fc512ced58acd5ae2ef4d55a885c Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 14 Mar 2012 10:34:33 -0700 Subject: Refix mac change to work around libvirt issue * fixes bug 921838 Change-Id: I11278a03c4429686499b2f62c66a7f442258f5a6 --- nova/utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nova/utils.py b/nova/utils.py index 83662dbb0..e375f11e5 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -1567,7 +1567,13 @@ def service_is_up(service): def generate_mac_address(): """Generate an Ethernet MAC address.""" - mac = [0xfe, 0x16, 0x3e, + # NOTE(vish): We would prefer to use 0xfe here to ensure that linux + # bridge mac addresses don't change, but it appears to + # conflict with libvirt, so we use the next highest octet + # that has the unicast and locally administered bits set + # properly: 0xfa. + # Discussion: https://bugs.launchpad.net/nova/+bug/921838 + mac = [0xfa, 0x16, 0x3e, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), random.randint(0x00, 0xff)] -- cgit