Fix network port unprovision
Ansible step "Unprovision instance network ports" is failing with "Error managing network ports 'NoneType' object is not subscriptable" because the 'hostname_role_map' is None in the unprovision case. Move the code accessing it into the state 'present' code block. Partial-Implements: blueprint network-data-v2-ports Change-Id: If66c9974b574813e6c24c1f8b4045bf839056988
This commit is contained in:
parent
ad5a1f9577
commit
fc559ca68c
|
@ -458,8 +458,8 @@ def manage_instances_ports(result, conn, stack, instances, concurrency, state,
|
|||
with futures.ThreadPoolExecutor(max_workers=concurrency) as p:
|
||||
for instance in instances:
|
||||
ironic_uuid = uuid_by_hostname.get(instance['hostname'])
|
||||
role = hostname_role_map[instance['hostname']]
|
||||
if state == 'present':
|
||||
role = hostname_role_map[instance['hostname']]
|
||||
provision_jobs.append(
|
||||
p.submit(_provision_ports,
|
||||
result,
|
||||
|
|
Loading…
Reference in New Issue