Skip to content

fix: recover healthcheck removals after independent target list eviction - #14277

Draft
moonming wants to merge 8 commits into
apache:masterfrom
moonming:codex/healthcheck-recover-evicted-target-list
Draft

moonming wants to merge 8 commits into
apache:masterfrom
moonming:codex/healthcheck-recover-evicted-target-list

Conversation

@moonming

Copy link
Copy Markdown
Member

Scope

This draft tracks recovery after independent eviction of a healthcheck registration list. It follows #14261 and depends on api7/lua-resty-healthcheck#76. The two PR branches share history through APISIX commit fa3e7d62e; the base here is master because the precursor's head branch belongs to a fork.

The manager retains identities of failed removals until an explicit removal can clear the per-target state. This matters when an independently evicted list and a subsequent worker-cache sweep leave an unhealthy state that neither list can enumerate. The narrower write-failure recovery in #14261 is tracked separately.

Regression and current validation

The former retry-suite test for the missing shared list and worker cache now lives in t/node/healthcheck-target-list-eviction.t. Its original assertions still cover shared unhealthy state after the sweep, timer-driven cleanup, checker reuse, preservation of the surviving unhealthy node, 40/40 successful upstream requests and fresh health after explicit re-add.

The test deletes the live shared-list key before the library reads the old registrations for its write, checks that its public listing is empty, and then fails the selected removal write. It uses the real Admin API, etcd, active probes, library worker sweep and HTTP upstreams. With library candidate 9c1a489, the focused test passed 6/6 assertions.

The compound case remains gated on a library release providing independent-eviction recovery. The PR still pins the existing dependency and remains draft. Its focused test covers this observed removal and re-add path; broader recovery and multi-worker behavior need separate validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant