From c428175eea598d09f8a882e9a8c021afba102caf Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Wed, 22 Nov 2023 21:03:02 +0530 Subject: [PATCH] [DHCP agent] Fix route to OVN metadata port for non-isolated networks This was missed in the original fix[1] during 5th patch set. When ovn metadata port exists it's ip should be used as route irrespective of subnet is isolated or not. [1] https://review.opendev.org/c/openstack/neutron/+/886988 Related-Bug: #1982569 Related-Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2213862 Change-Id: Icd84685c37fffa20e4fc9c5522f77bc63e2565f2 (cherry picked from commit 56172ed5aef07d278e0f9cd6bcd5164f3f0ffa49) --- neutron/agent/linux/dhcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/agent/linux/dhcp.py b/neutron/agent/linux/dhcp.py index 0504fae8d04..5569737bbe1 100644 --- a/neutron/agent/linux/dhcp.py +++ b/neutron/agent/linux/dhcp.py @@ -1212,7 +1212,7 @@ class Dnsmasq(DhcpLocalProcess): if subnet_dhcp_ip: metadata_route_ip = subnet_dhcp_ip - if not isolated_subnets[subnet.id] and gateway: + elif not isolated_subnets[subnet.id] and gateway: metadata_route_ip = gateway if metadata_route_ip: