Merge "Get the CIDR of the neutron port for NetworkConfig" into stable/train
This commit is contained in:
commit
1e0930620c
|
@ -871,37 +871,12 @@ resources:
|
||||||
type: OS::Heat::Value
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
value:
|
value:
|
||||||
ctlplane_subnet_cidr:
|
|
||||||
yaql:
|
|
||||||
expression: coalesce($.data, []).where(not isEmpty($)).first().split('/')[-1]
|
|
||||||
data:
|
|
||||||
if:
|
|
||||||
- ctlplane_subnet_cidr_set
|
|
||||||
- [{get_param: ControlPlaneSubnetCidr}]
|
|
||||||
- {get_attr: [ControlVirtualIP, network, tags]}
|
|
||||||
network_cidrs:
|
|
||||||
{%- for network in networks %}
|
|
||||||
{%- if network.enabled|default(true) and network.name in role.networks|default([]) %}
|
|
||||||
{{network.name}}_cidr:
|
|
||||||
yaql:
|
|
||||||
expression: coalesce($.data, []).where(not isEmpty($)).first().split('/')[-1]
|
|
||||||
data: {get_attr: [Networks, net_cidr_map, {{network.name_lower}}]}
|
|
||||||
{%- endif %}
|
|
||||||
{%- endfor %}
|
|
||||||
role_networks:
|
role_networks:
|
||||||
{%- 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}}
|
- {{network.name}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{%- for network in networks %}
|
|
||||||
{%- if network.enabled|default(true) and network.name in role.networks|default([]) %}
|
|
||||||
{{network.name_lower}}_cidr:
|
|
||||||
yaql:
|
|
||||||
expression: coalesce($.data, []).where(not isEmpty($)).first().split('/')[-1]
|
|
||||||
data: {get_attr: [Networks, net_cidr_map, {{network.name_lower}}]}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
service_metadata_settings: {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]}
|
service_metadata_settings: {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -582,10 +582,24 @@ resources:
|
||||||
properties:
|
properties:
|
||||||
type: json
|
type: json
|
||||||
value:
|
value:
|
||||||
|
ctlplane_subnet_cidr:
|
||||||
|
if:
|
||||||
|
- ctlplane_subnet_cidr_set
|
||||||
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
|
- yaql:
|
||||||
|
expression: str("{0}".format($.data).split("/")[-1])
|
||||||
|
data: {get_attr: [{{server_resource_name}}, addresses, ctlplane, 0, subnets, 0, cidr]}
|
||||||
{%- 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_lower}}_cidr: {get_attr: [{{network.name}}Port, cidr]}
|
||||||
fqdn_{{network.name_lower}}: {get_attr: [NetHostMap, value, {{network.name_lower}}, fqdn]}
|
fqdn_{{network.name_lower}}: {get_attr: [NetHostMap, value, {{network.name_lower}}, fqdn]}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
network_cidrs:
|
||||||
|
{%- for network in networks %}
|
||||||
|
{%- if network.enabled|default(true) and network.name in role.networks|default([]) %}
|
||||||
|
{{network.name}}_cidr: {get_attr: [{{network.name}}Port, cidr]}
|
||||||
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
fqdn_ctlplane: {get_attr: [NetHostMap, value, ctlplane, fqdn]}
|
fqdn_ctlplane: {get_attr: [NetHostMap, value, ctlplane, fqdn]}
|
||||||
fqdn_canonical: {get_attr: [NetHostMap, value, canonical, fqdn]}
|
fqdn_canonical: {get_attr: [NetHostMap, value, canonical, fqdn]}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Ansible GroupVars incorrectly keept a single subnet prefix per-network.
|
||||||
|
This caused a problem when multiple subnets using different subnet
|
||||||
|
prefixes where defined. Resulting in the wrong subnet prefix being
|
||||||
|
referenced in the NetworkConfig for roles.
|
||||||
|
|
||||||
|
AnsibleHostVars stores networks subnet prefixes instead.
|
||||||
|
See bug: `1895899
|
||||||
|
<https://bugs.launchpad.net/tripleo/+bug/1895899>`_.
|
||||||
|
|
Loading…
Reference in New Issue