Reviewed: https://review.openstack.org/614858 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a58a527494aa40b11b23eca47a8afb60fb24583a Submitter: Zuul Branch: master
commit a58a527494aa40b11b23eca47a8afb60fb24583a Author: Brian Haley <[email protected]> Date: Thu Nov 1 15:48:18 2018 -0400 Scan for MAC through all devices in macvtap agent The first device the agent happens to pick could be something without a MAC address like a 6in6 interface. This was causing the agent to fail to start if it was unlucky enough to pick that address. This patch just adjusts the logic to keep iterating through the list until we find a MAC. Change-Id: Iba9c7c3cb200e74a78ea885e8d9323de64c2c663 Closes-Bug: #1801030 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1801030 Title: neutron-macvtap-agent fails to start due to interface not having a mac address Status in neutron: Fix Released Bug description: The same as for linuxbridge-agent: https://bugs.launchpad.net/neutron/+bug/1669087 diff --git a/neutron/plugins/ml2/drivers/macvtap/agent/macvtap_neutron_agent.py b/neutron/plugins/ml2/drivers/macvtap/agent/macvtap_neutron_agent.py index 3a771fbba7..7119d7d2f6 100644 --- a/neutron/plugins/ml2/drivers/macvtap/agent/macvtap_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/macvtap/agent/macvtap_neutron_agent.py @@ -112,13 +112,15 @@ class MacvtapManager(amb.CommonAgentManagerBase): def get_agent_id(self): devices = ip_lib.IPWrapper().get_devices(True) - if devices: - mac = ip_lib.get_device_mac(devices[0].name) - return 'macvtap%s' % mac.replace(":", "") + for device in devices: + mac = ip_lib.get_device_mac(device.name) + if mac: + break else: LOG.error("Unable to obtain MAC address for unique ID. " "Agent terminated!") sys.exit(1) + return 'macvtap%s' % mac.replace(":", "") def get_devices_modified_timestamps(self, devices): # TODO(kevinbenton): this should be implemented to detect To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1801030/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

