fix(srv6): don't wedge EgressPolicy in Terminating on un-encodable withdraw#17
Merged
Merged
Conversation
…thdraw reconcileDelete rebuilt the withdraw advert from status.SRPolicy and returned any error, blocking finalizer removal. Under the default --bgp-encoding=sr-policy, BuildPath fails permanently when BSID or EndpointAddr is empty, and config.Validate treats bsid as optional, so a bsid-less color never goes Ready yet carries a non-nil status.SRPolicy. Deleting it made Withdraw fail every reconcile, wedging the object in Terminating (freeable only by manually patching finalizers). Nothing was ever announced, so the block was pure downside. - reconcileDelete now calls BuildPath() first to separate deterministic encode failures (log and drop the finalizer — nothing to withdraw) from transient transport errors (keep the finalizer and retry) - main.go requires a bsid per color when --bgp-encoding=sr-policy, failing fast at load rather than reaching the un-deletable state
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
reconcileDeletereturned any error from rebuilding the withdraw advert, blocking finalizer removal. Under the default--bgp-encoding=sr-policy,BuildPathfails permanently when BSID/EndpointAddr is empty, andconfig.Validatetreats bsid as optional — so a bsid-less color never goes Ready yet carries a non-nilstatus.SRPolicy. Deleting it made Withdraw fail every reconcile → object stuck in Terminating forever. Nothing was ever announced, so the block was pure downside.Fix
reconcileDeletecallsadv.BuildPath()first: deterministic encode failures log-and-drop the finalizer (nothing to withdraw); only transient transport errors keep the finalizer and retrymain.gorequires a bsid per color when--bgp-encoding=sr-policy(fail fast at load)Review finding
Medium #10, corroborated by cp-correctness (3/3) and error-handling (2/2).
Test
go test ./srv6egress/internal/controller/...green (control-plane runs natively).