carlos / platform Public

fix-lease-renew-after-pause

G2 drill 2 (dev, 2026-11-05): the HA holder's edge was SIGSTOPped, missed its renewal and was replaced. systemd's stop sent SIGTERM+SIGCONT; the overdue renewal ticker fired on resume and extended lock.json's expiry from 23:47:48Z to 23:54:40Z, so the takeover (proof AND expiry, correctly) waited 239 s past the bound.

Fix (internal/lease/health.go): the renewer samples its own liveness; any check that finds a gap over the pause limit (30 s, the NLB exclusion bound; on at TTL >= 3 min) latches ErrPaused (an ErrLost) before any renewal can go out. The lock keeps its last live expiry. Takeover rule unchanged.

Tests: real SIGSTOP/SIGTERM+SIGCONT child (RED before: renewed 1 ms after SIGCONT), in-process gap/no-false-positive tests, root-runner witness at production TTL against real S3 under systemd. Census: internal/lease envelope re-pinned only.

🤖 Generated with Claude Code

Human

Lease renewer gives its lease up unrenewed after a pause over 30 s (G2 drill 2: a SIGSTOPped holder renewed on SIGCONT during shutdown).

Commits 9
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity