fix: failed to drain unmanaged clusterqueue#2
Merged
Conversation
Signed-off-by: thxCode <thxcode0824@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR targets a regression where toggling a node out of management (gpustack.ai/managed=false) would orphan single-node scheduling objects without triggering the expected drain/deletion chain in the worker controllers.
Changes:
- Include
systemname.ManagedLabelKeyin Node-watch update predicates so managed toggles enqueue reconciles for ResourceFlavors/Cohorts (and related controllers). - Add unit test cases that guard the “managed=false nodes are excluded from indexes” behavior for ResourceFlavor/Cohort reconcilers.
- Remove the
--aggressive-event-filteringmanager option/flag and its plumbing.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/worker/controllers/worker/resourceflavor.go | Node-watch predicate now treats managed-label changes as relevant for enqueuing drain logic. |
| pkg/worker/controllers/worker/resourceflavor_test.go | Adds a case covering unmanaged nodes being excluded by the flavor-profile index (drain expected). |
| pkg/worker/controllers/worker/nodefeature.go | Simplifies Node update predicate path by removing “aggressive” mode plumbing. |
| pkg/worker/controllers/worker/cohort.go | Node-watch predicate now treats managed-label changes as relevant for cohort lifecycle. |
| pkg/worker/controllers/worker/cohort_test.go | Adds a case covering unmanaged nodes being excluded by the cohort-profile index (delete expected). |
| pkg/worker/controllers/worker/clusterqueue.go | Node-watch predicate now includes managed-label changes in label comparison. |
| pkg/manager/option.go | Removes AggressiveEventFiltering option and CLI flag definition. |
| pkg/manager/helper.go | Removes AllowAggressiveEventFiltering() and related state from the manager wrapper. |
| pkg/manager/config.go | Removes config wiring for aggressive event filtering. |
| .claude/skills/gpustack-operator-e2e/SKILL.md | Documents an e2e/manual verification flow for managed-toggle draining behavior. |
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.
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?