fix: only check modified queues during cluster readiness validation#3097
Open
almightychang wants to merge 1 commit intoaws:developfrom
Open
fix: only check modified queues during cluster readiness validation#3097almightychang wants to merge 1 commit intoaws:developfrom
almightychang wants to merge 1 commit intoaws:developfrom
Conversation
When adding a new SLURM queue, readiness check now only validates nodes in modified queues by reading change-set.json. Falls back to checking all nodes if change-set unavailable (backward compatible). Fixes: aws/aws-parallelcluster#7203 Changes: - check_cluster_ready.py: Add change-set parsing and queue filtering - ec2_utils.py: Add queue_names filtering parameter - constants.py: Add QUEUE_NAME_TAG constant - test_check_cluster_ready.py: Add 6 new test cases Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
|
Hi almightychang, Thank you for this PR. We are still reviewing the PR and thinking about a way to reuse We will keep you posted. Thank you, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes HeadNodeWaitCondition timeout when adding new SLURM queues to clusters with running jobs.
When adding a new queue via
pcluster update-cluster, the HeadNode readiness check currently validatescluster_config_versionfor all compute nodes, including those in unmodified queues. This causes timeout if existing nodes have running jobs since they retain the old config version.This PR optimizes the check to only validate nodes in modified queues by reading
change-set.json.Changes
_read_change_set()to parse modified queues and filter readiness checksqueue_namesparameter tolist_cluster_instance_ids_iterator()QUEUE_NAME_TAGconstantImplementation Details
Queue Filtering Logic
change-set.json(already generated by ParallelCluster)Scheduling.SlurmQueues[queue_name].*Edge Cases Handled
Testing
All 12 test cases pass (6 existing + 6 new):
Backward Compatibility
✅ Fully backward compatible:
Related Issue
Fixes aws/aws-parallelcluster#7203
Checklist
^[a-z][a-z0-9-]*$Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com