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
This commit is contained in:
parent
03ccf4ba9b
commit
d407c96d17
|
@ -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_network_config_data(self, stack):
|
||||
|
|
Loading…
Reference in New Issue