Browse Source

Ensure blacklisted nodes are not included in server_names

'ServerIdData' map actually returns 'None' ids for blacklisted
nodes for a role, as 'nova_server_resource' output is
evaluated with condition 'server_not_blacklisted'. This
results in get_server_names() returning these blacklisted
nodes with something like 'None: compute-1' and results
in issues when we write ansible_host_vars. As we don't intend to
write ansible_host_vars for blacklisted nodes, we can ignore
these from 'server_names'.

Closes-bug: #1856661
Change-Id: Iafecc885abac5583c07bc046bc4d541f5e1e1c00
(cherry picked from commit d407c96d17)
changes/55/700155/1
Rabi Mishra 2 months ago
parent
commit
13b77d3670
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      tripleo_common/utils/config.py

+ 2
- 1
tripleo_common/utils/config.py View File

@@ -50,7 +50,8 @@ class Config(object):
for idx, name in enumerate(shortnames):
if 'server_ids' in role_node_id_map:
server_id = role_node_id_map['server_ids'][role][idx]
servers[server_id] = name.lower()
if server_id is not None:
servers[server_id] = name.lower()
return servers

def get_deployment_data(self, stack,

Loading…
Cancel
Save