From 8cb67dc52dc0d66abf16c4bb8bdb90717ec4fdaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Wed, 21 Mar 2018 13:55:07 +0100 Subject: [PATCH] Fix next_hop for metadata service host route on local_subnet The host route to the metadata service should use the undercloud as next_hop when configuring the subnet that is on the same L2 segment as the undercloud itself. The code used to manage this was not correctly implemented. Change-Id: Icf40af8ac424d14386aacda38cf674cc25273fc8 Closes-Bug: #1757418 (cherry picked from commit 73d8effd15d45c28ecababbbca2787c6d152bff8) --- instack_undercloud/undercloud.py | 4 +--- ...-route-to-metadata-on-local-subnet-5ee8d2221a2fc762.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/fix-route-to-metadata-on-local-subnet-5ee8d2221a2fc762.yaml diff --git a/instack_undercloud/undercloud.py b/instack_undercloud/undercloud.py index e11ea6fd8..ce8e824d6 100644 --- a/instack_undercloud/undercloud.py +++ b/instack_undercloud/undercloud.py @@ -2187,11 +2187,9 @@ def _config_neutron_segments_and_subnets(sdk, ctlplane_id): s = CONF.get(name) phynet = name + metadata_nexthop = s.gateway if name == CONF.local_subnet: phynet = PHYSICAL_NETWORK - - metadata_nexthop = s.gateway - if str(netaddr.IPNetwork(CONF.local_ip).ip) in s.cidr: metadata_nexthop = str(netaddr.IPNetwork(CONF.local_ip).ip) host_routes = [{'destination': '169.254.169.254/32', diff --git a/releasenotes/notes/fix-route-to-metadata-on-local-subnet-5ee8d2221a2fc762.yaml b/releasenotes/notes/fix-route-to-metadata-on-local-subnet-5ee8d2221a2fc762.yaml new file mode 100644 index 000000000..042d0a1c4 --- /dev/null +++ b/releasenotes/notes/fix-route-to-metadata-on-local-subnet-5ee8d2221a2fc762.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes `bug 1757418 `__. + The route to the metadata service on the local subnet was incorrectly set + to the gateway. It is now set to the ``local_ip`` of the undercloud.