Don't add IpList for disabled networks
When disabling networks in network data an IpList
entry was added in {{role.name}}IpListMap. This
caused a validation error.
Add a yaql expression to filter on role networks in
network/ports/net_ip_list_map.j2.yaml. RoleNetIpMap
should'nt have entries for networks not used by the
role that maps to the ctlplane IP.
Depends-On: https://review.opendev.org/710574
Closes-Bug: #1842001
Change-Id: I0cda298b0ed27705a8b6e0f62633af2253d8d0de
(cherry picked from commit f222681a43
)
This commit is contained in:
parent
0ac2a9c4b7
commit
7c01813e24
|
@ -29,6 +29,9 @@ parameters:
|
||||||
default: false
|
default: false
|
||||||
description: Whether this is an cell additional to the default cell.
|
description: Whether this is an cell additional to the default cell.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
RoleNetworks:
|
||||||
|
default: ctlplane
|
||||||
|
type: comma_delimited_list
|
||||||
|
|
||||||
conditions:
|
conditions:
|
||||||
is_cell: {equals: [{get_param: NovaAdditionalCell}, true]}
|
is_cell: {equals: [{get_param: NovaAdditionalCell}, true]}
|
||||||
|
@ -62,7 +65,12 @@ resources:
|
||||||
type: json
|
type: json
|
||||||
value:
|
value:
|
||||||
map_replace:
|
map_replace:
|
||||||
- ctlplane: {get_param: ControlPlaneIpList}
|
- yaql:
|
||||||
|
expression: let(root => $) -> dict($.data.net_ip_map.items().where($[0] in $root.data.role_networks))
|
||||||
|
data:
|
||||||
|
role_networks: {get_param: RoleNetworks}
|
||||||
|
net_ip_map:
|
||||||
|
ctlplane: {get_param: ControlPlaneIpList}
|
||||||
{%- for network in networks if network.enabled|default(true) %}
|
{%- for network in networks if network.enabled|default(true) %}
|
||||||
{{network.name_lower}}: {get_param: {{network.name}}IpList}
|
{{network.name_lower}}: {get_param: {{network.name}}IpList}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
|
@ -660,12 +660,13 @@ resources:
|
||||||
type: OS::TripleO::Network::Ports::NetIpListMap
|
type: OS::TripleO::Network::Ports::NetIpListMap
|
||||||
properties:
|
properties:
|
||||||
ControlPlaneIpList: {get_attr: [{{role.name}}, ip_address]}
|
ControlPlaneIpList: {get_attr: [{{role.name}}, ip_address]}
|
||||||
{%- for network in networks %}
|
{%- for network in networks if network.enabled|default(true) and network.name in role.networks|default([]) %}
|
||||||
{%- if network.enabled|default(true) and network.name in role.networks|default([]) %}
|
|
||||||
{{network.name}}IpList: {get_attr: [{{role.name}}, {{network.name_lower}}_ip_address]}
|
{{network.name}}IpList: {get_attr: [{{role.name}}, {{network.name_lower}}_ip_address]}
|
||||||
{%- else %}
|
{%- endfor %}
|
||||||
{{network.name}}IpList: {get_attr: [{{role.name}}, ip_address]}
|
RoleNetworks:
|
||||||
{%- endif %}
|
- ctlplane
|
||||||
|
{%- for network in networks if network.enabled|default(true) and network.name in role.networks|default([]) %}
|
||||||
|
- {{network.name_lower}}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
EnabledServices: {get_attr: [{{role.name}}ServiceNames, value]}
|
EnabledServices: {get_attr: [{{role.name}}ServiceNames, value]}
|
||||||
ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
|
ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixed an issue where disabling one or more networks in
|
||||||
|
``network_data.yaml`` caused deployment failure. (See bug:
|
||||||
|
`#1842001 <https://bugs.launchpad.net/tripleo/+bug/1842001>`_)
|
Loading…
Reference in New Issue