diff options
author | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-03-14 10:34:33 -0700 |
---|---|---|
committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-03-14 10:35:18 -0700 |
commit | b684d651f540fc512ced58acd5ae2ef4d55a885c (patch) | |
tree | 9597c16febe9ea1d6afce35b4ad76f18bf2db14b /nova/utils.py | |
parent | a236fdd380bec0793b6198e5e8eb40aa30ab729d (diff) | |
download | nova-b684d651f540fc512ced58acd5ae2ef4d55a885c.tar.gz nova-b684d651f540fc512ced58acd5ae2ef4d55a885c.tar.xz nova-b684d651f540fc512ced58acd5ae2ef4d55a885c.zip |
Refix mac change to work around libvirt issue
* fixes bug 921838
Change-Id: I11278a03c4429686499b2f62c66a7f442258f5a6
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 8 |
1 files changed, 7 insertions, 1 deletions
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)] |