From d2109e1c35011fcaeec368eb1b8bf6a9ec75e238 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 7 Oct 2020 20:04:01 +0100 Subject: [PATCH] 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 --- ansible/group_vars/all/compute | 4 ++-- ansible/group_vars/all/controllers | 8 ++++---- ansible/group_vars/all/monitoring | 4 ++-- ansible/group_vars/all/seed | 4 ++-- ansible/group_vars/all/seed-hypervisor | 2 +- ansible/group_vars/all/storage | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ansible/group_vars/all/compute b/ansible/group_vars/all/compute index b27548a71..eb5f7bd90 100644 --- a/ansible/group_vars/all/compute +++ b/ansible/group_vars/all/compute @@ -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: [] diff --git a/ansible/group_vars/all/controllers b/ansible/group_vars/all/controllers index 107822497..e820bcf11 100644 --- a/ansible/group_vars/all/controllers +++ b/ansible/group_vars/all/controllers @@ -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: [] diff --git a/ansible/group_vars/all/monitoring b/ansible/group_vars/all/monitoring index 5eaec6df4..2a9a5c0e5 100644 --- a/ansible/group_vars/all/monitoring +++ b/ansible/group_vars/all/monitoring @@ -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: [] diff --git a/ansible/group_vars/all/seed b/ansible/group_vars/all/seed index 4df06f3b5..f5c6f36a4 100644 --- a/ansible/group_vars/all/seed +++ b/ansible/group_vars/all/seed @@ -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: [] diff --git a/ansible/group_vars/all/seed-hypervisor b/ansible/group_vars/all/seed-hypervisor index 7ebdeee50..2826b9577 100644 --- a/ansible/group_vars/all/seed-hypervisor +++ b/ansible/group_vars/all/seed-hypervisor @@ -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 }}" diff --git a/ansible/group_vars/all/storage b/ansible/group_vars/all/storage index 655a8e321..bc2187140 100644 --- a/ansible/group_vars/all/storage +++ b/ansible/group_vars/all/storage @@ -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: []