Skip to content

Commit

Permalink
Refix mac change to work around libvirt issue
Browse files Browse the repository at this point in the history
 * fixes bug 921838

Change-Id: I11278a03c4429686499b2f62c66a7f442258f5a6
  • Loading branch information
vishvananda committed Mar 14, 2012
1 parent a236fdd commit b684d65
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nova/utils.py
Expand Up @@ -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)]
Expand Down

0 comments on commit b684d65

Please sign in to comment.