[OVN] Update the DHCP options when the metadata port is modified
Always update the DHCP options when the metadata port is created,
updated or deleted. If the metadata port IP addresses are updated,
the DHCP options register should be too, modifying the static routes
defined in "DHCP_Options.options.classless_static_route".
These static routes will be injected in the VM in the DHCP request.
The IP address of the metadata port should match with the static
route redirecting the traffic to the metadata IP address
"169.254.169.254/32":
$ ip r
default via 10.0.0.1 dev eth0
10.0.0.0/28 dev eth0 scope link src 10.0.0.7
169.254.169.254 via 10.0.0.2 dev eth0 # 10.0.0.2 is the metadata # port IP address
Conflicts: neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py neutron/tests/unit/fake_resources.py
Closes-Bug: #1942794
Change-Id: Id5d4909caa521a899b97d83bdc1963b010e97dac
(cherry picked from commit bd0ded15ca21161c0f20679477445f4e31128267)
(cherry picked from commit 7efce62b4fc5cbf512a8fe71366910e37b053614)
(cherry picked from commit f4dd0b80ac166278239ed0c43e35dacfaea81d0b)
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/813411 /opendev. org/openstack/ neutron/ commit/ 8b7597ea9d9fae1 191062afac30559 014d080c29
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/ussuri
commit 8b7597ea9d9fae1 191062afac30559 014d080c29
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Sep 7 08:52:21 2021 +0000
[OVN] Update the DHCP options when the metadata port is modified
Always update the DHCP options when the metadata port is created, options. classless_ static_ route".
updated or deleted. If the metadata port IP addresses are updated,
the DHCP options register should be too, modifying the static routes
defined in "DHCP_Options.
These static routes will be injected in the VM in the DHCP request. 254.169. 254/32" :
The IP address of the metadata port should match with the static
route redirecting the traffic to the metadata IP address
"169.
$ ip r 254.169. 254 via 10.0.0.2 dev eth0 # 10.0.0.2 is the metadata
# port IP address
neutron/ plugins/ ml2/drivers/ ovn/mech_ driver/ ovsdb/ovn_ client. py
neutron/ tests/functiona l/plugins/ ml2/drivers/ ovn/mech_ driver/ test_mech_ driver. py
neutron/ tests/unit/ fake_resources. py
default via 10.0.0.1 dev eth0
10.0.0.0/28 dev eth0 scope link src 10.0.0.7
169.
Conflicts:
Closes-Bug: #1942794 899b97d83bdc196 3b010e97dac c0f20679477445f 4e31128267) 512a8fe71366910 e37b053614) 8239ed0c43e35da cfaea81d0b)
Change-Id: Id5d4909caa521a
(cherry picked from commit bd0ded15ca21161
(cherry picked from commit 7efce62b4fc5cbf
(cherry picked from commit f4dd0b80ac16627