Repository navigation
fix: recover owned LB drain weights without reloading - #3
Merged
Merged
Conversation
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.
When a target restarted with the same identity and IP,
target.draincould leave its HAProxy runtime weight at zero after it became healthy. The zero-session path lost drain tracking immediately, and an unchanged generated configuration skipped the reload that might otherwise reset the weight. Both paths could leave requests returning 503.Track the weights this controller changes for every backend and reconcile them independently of configuration reloads. Recovery waits for a healthy desired endpoint, preserves manual zero/MAINT/DRAIN/custom weights, verifies runtime readback, and retains ownership across lifecycle
stoppingzeros. Reload handling compares runtime and initial weights before reapplying an active drain, and later desired-weight edits supersede the old snapshot. Stopping targets also retain desired zero when port rules merge.This is the
v0.9.28source candidate; the published image remainsv0.9.27. Native PastureStack project/node/LB HTTP and target-restart qualification remains pending before a release tag or image publication.Validation:
provider/haproxyand the stopping/merged-rule case incontroller/rancher.go vet -mod=vendor ./provider/haproxy,scripts/log-safety-test, andgit diff --checkpassed.The eight-file change uses the existing provider and image packaging architecture. Protected CI and required CodeQL checks remain unchanged.