Today Nova updates the mac_address of a direct-physical port to reflect
the MAC address of the physical device the port is bound to. But this
can only be done before the port is bound. However during migration Nova
is not able to update the MAC when the port is bound to a different
physical device on the destination host.
This patch extends port binding logic for direct-physical ports to allow
providing the MAC address of the physical device via the binding profile.
If it is provided then Neutron overwrites the value of the mac_address
field of the port with the value from the active binding profile.
Also when the port is being unbound or the MAC address is removed from
the active binding porfile then neutron resets the mac_address field of
port to a generated MAC to avoid duplicated MAC issues when another port
is being bound to the same physical device.
The shim API extension for this change is being proposed in
I54b4c85ffc4856fba7ad5e9e29f77f74815e1275 in neutron-lib.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/829247 /opendev. org/openstack/ neutron/ commit/ 4e78aaa694683f8 12d091a794bd140 a7d363dd9b
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 4e78aaa694683f8 12d091a794bd140 a7d363dd9b
Author: Balazs Gibizer <email address hidden>
Date: Tue Feb 15 13:56:34 2022 +0100
Update port MAC from binding profile for PFs
Today Nova updates the mac_address of a direct-physical port to reflect
the MAC address of the physical device the port is bound to. But this
can only be done before the port is bound. However during migration Nova
is not able to update the MAC when the port is bound to a different
physical device on the destination host.
This patch extends port binding logic for direct-physical ports to allow
providing the MAC address of the physical device via the binding profile.
If it is provided then Neutron overwrites the value of the mac_address
field of the port with the value from the active binding profile.
Also when the port is being unbound or the MAC address is removed from
the active binding porfile then neutron resets the mac_address field of
port to a generated MAC to avoid duplicated MAC issues when another port
is being bound to the same physical device.
The shim API extension for this change is being proposed in 4856fba7ad5e9e2 9f77f74815e1275 in neutron-lib.
I54b4c85ffc
Depends-On: https:/ /review. opendev. org/c/openstack /neutron- lib/+/831935
Closes-Bug: #1942329
Change-Id: Ib0638f5db69cb9 2daf6932890cb89 e83cf84f295