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
This commit is contained in:
Harald Jensås 2018-03-21 13:55:07 +01:00
parent 41f2694d13
commit 73d8effd15
1 changed files with 1 additions and 3 deletions

View File

@ -2169,11 +2169,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',