diff options
Diffstat (limited to 'ironic/drivers/modules/network/common.py')
-rw-r--r-- | ironic/drivers/modules/network/common.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ironic/drivers/modules/network/common.py b/ironic/drivers/modules/network/common.py index 3798c2bd4..f10089d26 100644 --- a/ironic/drivers/modules/network/common.py +++ b/ironic/drivers/modules/network/common.py @@ -268,8 +268,10 @@ def plug_port_to_tenant_network(task, port_like_obj, client=None): # because other port attributes may have been set by the user or # nova. port_attrs = {'binding:vnic_type': neutron.VNIC_BAREMETAL, - 'binding:host_id': node.uuid, - 'mac_address': port_like_obj.address} + 'binding:host_id': node.uuid} + # NOTE(kaifeng) Only update mac address when it's available + if port_like_obj.address: + port_attrs['mac_address'] = port_like_obj.address binding_profile = {'local_link_information': local_link_info} if local_group_info: binding_profile['local_group_information'] = local_group_info |