Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

Commit 990d776

Browse files
jvilarrubsngardner
authored andcommitted
Reverse logic in valid_placement_nodes
1 parent d78431e commit 990d776

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
99
- Migrate from network overrides in bulkInsert to honoring instance templates.
1010
- Add additional_networks support to instance template and partition_nodes.
1111
- Support Tier 1 networking in instance templates.
12+
- Reverse logic in valid_placement_nodes
1213

1314
## \[5.8.0\]
1415

scripts/resume.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,14 +445,14 @@ def valid_placement_nodes(job_id, nodelist):
445445
for node in nodelist
446446
}
447447
fail = False
448-
valid_types = ["a2", "a3", "c2", "c2d", "c3", "n2", "n2d"]
448+
invalid_types = ["e2", "t2d", "n1", "t2a", "m1", "m2", "m3"]
449449
for prefix, machine_type in machine_types.items():
450-
if machine_type.split("-")[0] not in valid_types:
450+
if machine_type.split("-")[0] in invalid_types:
451451
log.warn(f"Unsupported machine type for placement policy: {machine_type}.")
452452
fail = True
453453
if fail:
454454
log.warn(
455-
f"Please use a valid machine type with placement policy: ({','.join(valid_types)})"
455+
f"Please do not use any the following machine types with placement policy: ({','.join(invalid_types)})"
456456
)
457457
return False
458458
return True

0 commit comments

Comments
 (0)