mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 20:08:09 +00:00
ensure VM IDs are unique before calling Azure reimage/delete APIs (#1023)
This commit is contained in:
@ -537,7 +537,7 @@ class Scaleset(BASE_SCALESET, ORMMixin):
|
||||
)
|
||||
return
|
||||
|
||||
machine_ids = []
|
||||
machine_ids = set()
|
||||
for node in nodes:
|
||||
if node.debug_keep_node:
|
||||
logging.warning(
|
||||
@ -547,7 +547,7 @@ class Scaleset(BASE_SCALESET, ORMMixin):
|
||||
node.machine_id,
|
||||
)
|
||||
else:
|
||||
machine_ids.append(node.machine_id)
|
||||
machine_ids.add(node.machine_id)
|
||||
|
||||
logging.info(
|
||||
SCALESET_LOG_PREFIX + "deleting nodes scaleset_id:%s machine_id:%s",
|
||||
@ -585,7 +585,7 @@ class Scaleset(BASE_SCALESET, ORMMixin):
|
||||
)
|
||||
return
|
||||
|
||||
machine_ids = []
|
||||
machine_ids = set()
|
||||
for node in nodes:
|
||||
if node.debug_keep_node:
|
||||
logging.warning(
|
||||
@ -595,7 +595,7 @@ class Scaleset(BASE_SCALESET, ORMMixin):
|
||||
node.machine_id,
|
||||
)
|
||||
else:
|
||||
machine_ids.append(node.machine_id)
|
||||
machine_ids.add(node.machine_id)
|
||||
|
||||
if not machine_ids:
|
||||
logging.info(
|
||||
|
Reference in New Issue
Block a user