[stable-only][OVN] Set VETH interface MAC address before up
Set the VETH interface MAC address of the metadata namespace before
setting this interface as up.
This change was introduced in [1] and should be backported to stable
versions.
[1]https://review.opendev.org/c/openstack/neutron/+/894026/12/neutron/agent/ovn/metadata/agent.py#710
Closes-Bug: #2055561
Change-Id: Ied8f7a5b6c0e9c295e8e040546c53bd98206ef12
(cherry picked from commit ac63999b66
)
This commit is contained in:
parent
c162ea2b26
commit
0673a9bb23
@ -649,13 +649,13 @@ class MetadataAgent(object):
|
||||
ip1, ip2 = ip_lib.IPWrapper().add_veth(
|
||||
veth_name[0], veth_name[1], namespace)
|
||||
|
||||
# Configure the MAC address.
|
||||
ip2.link.set_address(metadata_port_info.mac)
|
||||
|
||||
# Make sure both ends of the VETH are up
|
||||
ip1.link.set_up()
|
||||
ip2.link.set_up()
|
||||
|
||||
# Configure the MAC address.
|
||||
ip2.link.set_address(metadata_port_info.mac)
|
||||
|
||||
cidrs_to_add, cidrs_to_delete = self._process_cidrs(
|
||||
{dev['cidr'] for dev in ip2.addr.list()},
|
||||
datapath_ports_ips,
|
||||
|
Loading…
Reference in New Issue
Block a user