Support ctlplane subnet host routes from undercloud.conf

Change: I692fcc4a494b2cda1911814a53a0c6ec2f99f807 in
python-tripleoclient added support to define host routes
for the subnets in undercloud.conf.

Update the undercloud ctlplane network post script so
that it add's these routes to the host_routes property
of the undercloud ctlplane subnets.

THT already uses the data in the subnets host_routes, it
is passed as ControlPlaneStaticRoutes to NetworkConfig
unless ControlPlaneStaticRoutes was statically overriden
in the environment.

Closes-Bug: #1819464
Depends-On: I692fcc4a494b2cda1911814a53a0c6ec2f99f807
Change-Id: I46b7c7175f542ad4d375a20f133c05064e7b7222
This commit is contained in:
Harald Jensås 2019-03-11 20:04:08 +01:00
parent 1adc6ab8bd
commit 42b0bc930a
2 changed files with 14 additions and 0 deletions

View File

@ -205,6 +205,7 @@ def _local_neutron_segments_and_subnets(sdk, ctlplane_id, net_cidrs):
segment = _get_segment(sdk, CONF['physical_network'], ctlplane_id)
host_routes = [{'destination': '169.254.169.254/32',
'nexthop': CONF['local_ip']}]
host_routes += s['HostRoutes']
if subnet:
if CONF['enable_routed_networks'] and subnet.segment_id == None:
# The subnet exists and does not have a segment association. Since
@ -245,6 +246,7 @@ def _remote_neutron_segments_and_subnets(sdk, ctlplane_id, net_cidrs):
metadata_nexthop = s['NetworkGateway']
host_routes = [{'destination': '169.254.169.254/32',
'nexthop': metadata_nexthop}]
host_routes += s['HostRoutes']
subnet = _get_subnet(sdk, s['NetworkCidr'], ctlplane_id)
segment = _get_segment(sdk, phynet, ctlplane_id)
if subnet:

View File

@ -0,0 +1,12 @@
---
features:
- |
A new option ``host_routes`` are now available for subnet defenitions in
``undercloud.conf``.
- Host routes specified for the *local_subnet* will be added to
the routing table on the Undercloud.
- Host routes for *all* subnets are passed to tripleo-heat-templates so
that the *host_routes* property of the ctlplane subnets are set
accordingly when installing the Undercloud.