Skip to content

PeerAddressAllowlistFilter fail-open lasts the full startup grace window if any peer host never resolves #4828

Closed

Description

@ruispereira

Affected version: 26.6.1
Component: PeerAddressAllowlistFilter.isAllowed / doResolve
Severity: MEDIUM

Summary

everCompletelyResolved latches true only when every peer host resolves
(covered == peerHosts.size()). If one pod is permanently down at startup its DNS
record never publishes, so completeness is never reached and the fail-open branch
stays active for the entire configured startupGraceMs.

Code

PeerAddressAllowlistFilter.java:151-178 (fail-open gate), :202-243 (doResolve, :241 completeness latch).

Impact

During the grace window any pod IP in the namespace can open a Raft gRPC transport
and inject AppendEntries. With a down peer this window is the full configured grace
(operators often raise it), not the brief DNS-convergence blip it was designed for.
Mitigated by K8s NetworkPolicy, which is the real control.

Suggested fix

Enforce after startupGraceMs regardless of all-peers-resolved; treat NetworkPolicy
as the primary control. (Largely hardening/documentation.)

Activity

  1. self-assigned this
    on Jun 30, 2026
  2. added theissue type on Jun 30, 2026
  3. added this to the 26.7.1 milestone on Jun 30, 2026
  4. added a commit that references this issue on Jun 30, 2026
  5. lvca commented on Jun 30, 2026

    @lvca
    Member

    Fixed in main (commit 3dc253c).

    What was happening: the Raft peer allowlist has a startup "fail-open" window that briefly accepts unknown connections so a legitimately-restarting peer isn't locked out before its DNS name is published on Kubernetes. That window was only meant to close once the peers had been discovered, but it waited for every peer to resolve. If one node was permanently down its DNS record never appeared, so the window never closed early and stayed open for the full configured arcadedb.ha.peerAllowlistStartupGraceMs.

    Fix: the window now closes as soon as a majority (quorum) of the configured peers have resolved, instead of all of them. A majority is enough to run the cluster, so a single down node no longer keeps the fail-open window open. A node that comes back later is still picked up automatically. The window is also still capped by peerAllowlistStartupGraceMs as before.

    As noted, a Kubernetes NetworkPolicy remains the primary control; this is defense-in-depth hardening.

  6. added a commit that references this issue on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions