Skip to content

Remove obsolete LB backends before adding replacements - #163

Open
jlamillan wants to merge 1 commit into
oracle:mainfrom
jlamillan:codex/delete-stale-lb-backends
Open

jlamillan wants to merge 1 commit into
oracle:mainfrom
jlamillan:codex/delete-stale-lb-backends

Conversation

@jlamillan

@jlamillan jlamillan commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Why

During Kubernetes node churn, backend entries for removed nodes can remain on an OCI load balancer. A backend-set update that adds replacement nodes before removing those stale entries can exceed the load balancer's total backend limit (backends-per-lb-limit) and fail, leaving backend sets out of sync.

Summary

  • Remove obsolete backend registrations before submitting a backend-set update that adds replacements.
  • Refresh the load balancer and ETag around each deletion, wait for OCI work requests, and retain the last existing backend until a replacement can be added when there is no overlap.
  • Reject invalid desired backends before any deletion and serialize backend updates for the same load balancer.

Validation

  • go test -mod=vendor ./pkg/...

Operational note

A failed OCI delete or update returns an error for normal reconciliation retry. The change does not remove a backend that is still in the desired set.

Also note, these proposed changes have been running in our production clusters for a number of weeks.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant