Skip to content

Commit cfae64c

Browse files
Validate capacity reservation if capacity reservation target is specified on compute resource or queue
This was a bug from aws#4295. The validation was only executed if capacity reservation target is specified on compute resource Signed-off-by: Hanwen <[email protected]>
1 parent e8f3c5d commit cfae64c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/src/pcluster/config/cluster_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,8 +2459,8 @@ def _register_validators(self):
24592459
)
24602460
# The validation below has to be in cluster config class instead of queue class
24612461
# to make sure the subnet APIs are cached by previous validations.
2462-
if compute_resource.capacity_reservation_target:
2463-
cr_target = compute_resource.capacity_reservation_target
2462+
cr_target = compute_resource.capacity_reservation_target or queue.capacity_reservation_target
2463+
if cr_target:
24642464
self._register_validator(
24652465
CapacityReservationValidator,
24662466
capacity_reservation_id=cr_target.capacity_reservation_id,

0 commit comments

Comments
 (0)