Skip to content

Commit fab9fcb

Browse files
authored
[ARO] az aro update: Fix credential refresh to handle clusters with invalid machinesets (#31593)
1 parent d3c6234 commit fab9fcb

File tree

1 file changed

+4
-1
lines changed
  • src/azure-cli/azure/cli/command_modules/aro

1 file changed

+4
-1
lines changed

src/azure-cli/azure/cli/command_modules/aro/custom.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,11 @@ def get_cluster_network_resources(cli_ctx, oc, fail):
507507

508508
# Ensure that worker_profiles_status exists
509509
# it will not be returned if the cluster resources do not exist
510+
511+
# We filter nonexistent subnets here as we only propagate subnet values for
512+
# worker profiles/machinesets considered valid.
510513
if oc.worker_profiles_status is not None:
511-
worker_subnets |= {w.subnet_id for w in oc.worker_profiles_status}
514+
worker_subnets |= {w.subnet_id for w in oc.worker_profiles_status if w.subnet_id is not None}
512515

513516
master_parts = parse_resource_id(master_subnet)
514517
vnet = resource_id(

0 commit comments

Comments
 (0)