Fix filtering of network names set to an empty string

Currently we filter out networks that are set to None. However, we
should also filter out networks set to an empty string. This affects the
overcloud ironic networks that were disabled in
I300d0ef136224126f25d2c70a80a42afeea5f586 when ironic is disabled.

Story: 2008207
Task: 41076

Change-Id: Iba16d6232e1a6ef069cd3ccb870e5bfa89cd913c
This commit is contained in:
Mark Goddard 2020-10-07 20:04:01 +01:00 committed by Pierre Riteau
parent 02c0383914
commit d2109e1c35
6 changed files with 13 additions and 13 deletions

View File

@ -12,7 +12,7 @@ compute_bootstrap_user: "{{ lookup('env', 'USER') }}"
# List of networks to which compute nodes are attached.
compute_network_interfaces: >
{{ (compute_default_network_interfaces +
compute_extra_network_interfaces) | reject('none') | unique | list }}
compute_extra_network_interfaces) | select | unique | list }}
# List of default networks to which compute nodes are attached.
compute_default_network_interfaces: >
@ -20,7 +20,7 @@ compute_default_network_interfaces: >
internal_net_name,
storage_net_name,
tunnel_net_name] +
(external_net_names if kolla_enable_neutron_provider_networks | bool else [])) | reject('none') | unique | list }}
(external_net_names if kolla_enable_neutron_provider_networks | bool else [])) | select | unique | list }}
# List of extra networks to which compute nodes are attached.
compute_extra_network_interfaces: []

View File

@ -14,7 +14,7 @@ controller_network_interfaces: >
{{ (controller_default_network_interfaces +
controller_extra_network_interfaces +
(controller_network_host_network_interfaces
if inventory_hostname in groups['network'] else [])) | reject('none') | unique | list }}
if inventory_hostname in groups['network'] else [])) | select | unique | list }}
# List of default networks to which controller nodes are attached.
controller_default_network_interfaces: >
@ -25,7 +25,7 @@ controller_default_network_interfaces: >
internal_net_name,
storage_net_name,
swift_storage_net_name,
cleaning_net_name] | reject('none') | unique | list }}
cleaning_net_name] | select | unique | list }}
# List of extra networks to which controller nodes are attached.
controller_extra_network_interfaces: []
@ -33,7 +33,7 @@ controller_extra_network_interfaces: []
# List of network interfaces to which network nodes are attached.
controller_network_host_network_interfaces: >
{{ (controller_network_host_default_network_interfaces +
controller_network_host_extra_network_interfaces) | reject('none') | unique | list }}
controller_network_host_extra_network_interfaces) | select | unique | list }}
# List of default network interfaces to which network nodes are attached.
controller_network_host_default_network_interfaces: >
@ -42,7 +42,7 @@ controller_network_host_default_network_interfaces: >
storage_net_name,
public_net_name,
tunnel_net_name] +
external_net_names) | reject('none') | unique | list }}
external_net_names) | select | unique | list }}
# List of extra networks to which network nodes are attached.
controller_network_host_extra_network_interfaces: []

View File

@ -14,13 +14,13 @@ monitoring_network_interfaces: >
{{ controller_network_interfaces | unique | list
if inventory_hostname in groups['controllers'] else
(monitoring_default_network_interfaces +
monitoring_extra_network_interfaces) | reject('none') | unique | list }}
monitoring_extra_network_interfaces) | select | unique | list }}
# List of default networks to which monitoring nodes are attached.
monitoring_default_network_interfaces: >
{{ [admin_oc_net_name,
internal_net_name,
public_net_name] | reject('none') | unique | list }}
public_net_name] | select | unique | list }}
# List of extra networks to which monitoring nodes are attached.
monitoring_extra_network_interfaces: []

View File

@ -12,13 +12,13 @@ seed_bootstrap_user: "{{ lookup('env', 'USER') }}"
# List of networks to which seed nodes are attached.
seed_network_interfaces: >
{{ (seed_default_network_interfaces +
seed_extra_network_interfaces) | reject('none') | unique | list }}
seed_extra_network_interfaces) | select | unique | list }}
# List of default networks to which seed nodes are attached.
seed_default_network_interfaces: >
{{ [admin_oc_net_name,
oob_oc_net_name,
provision_oc_net_name] | reject('none') | unique | list }}
provision_oc_net_name] | select | unique | list }}
# List of extra networks to which seed nodes are attached.
seed_extra_network_interfaces: []

View File

@ -12,7 +12,7 @@ seed_hypervisor_bootstrap_user: "{{ lookup('env', 'USER') }}"
# List of networks to which seed hypervisor nodes are attached.
seed_hypervisor_network_interfaces: >
{{ (seed_hypervisor_default_network_interfaces +
seed_hypervisor_extra_network_interfaces) | reject('none') | unique | list }}
seed_hypervisor_extra_network_interfaces) | select | unique | list }}
# List of default networks to which seed hypervisor nodes are attached.
seed_hypervisor_default_network_interfaces: "{{ seed_default_network_interfaces }}"

View File

@ -16,14 +16,14 @@ storage_network_interfaces: >
([swift_storage_net_name]
if storage_needs_swift_network else []) +
([swift_storage_replication_net_name]
if storage_needs_swift_replication_network else [])) | reject('none') | unique | list }}
if storage_needs_swift_replication_network else [])) | select | unique | list }}
# List of default networks to which storage nodes are attached.
storage_default_network_interfaces: >
{{ [admin_oc_net_name,
internal_net_name,
storage_mgmt_net_name,
storage_net_name] | reject('none') | unique | list }}
storage_net_name] | select | unique | list }}
# List of extra networks to which storage nodes are attached.
storage_extra_network_interfaces: []