Skip to content

fix(wake): bound wake requests and preserve HostPort handoffs - #840

Draft
Baylem wants to merge 24 commits into
masterfrom
stack/pr-761
Draft

Baylem wants to merge 24 commits into
masterfrom
stack/pr-761

Conversation

@Baylem

@Baylem Baylem commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Supersedes #761 using the same reviewed commits on an upstream branch. Prior review discussion remains on that PR. Current-head CI is pending.

This PR independently targets master.

Wake requests could block beyond the join budget, report success while another request was still failing, and stall UDP receives. HostPort sleep/wake could also create the replacement listener before the previous pod released its port or move it away from the advertised node.

Bound the shared wake PATCH and total join attempt, propagate its actual result to concurrent callers, and coalesce UDP wake work behind a bounded queue. Persist the HostPort endpoint node and UID, wait for actual pod drain in both directions, and pin the game and sentinel through scheduler affinity. Missing or unschedulable endpoint nodes report an explicit condition.

Closes #729. Closes #730.

Validation:

  • Linux operator/sentinel production builds and operator envtest, sentinel, and E2E test-source compilation passed. Tests were not executed locally, per repository policy.
  • Added real TCP/UDP regressions and a dedicated two-node CI bucket for repeated handoffs, occupied ports, terminating sentinels, cordoned nodes, and node deletion.
  • Actionlint and offline zizmor passed. Independent review completed.

Resource requests remain in the separate #724 change. This PR shares reconciliation code with #760; integration must retain its operation fence and these HostPort handoff gates. Existing web/Compose image builds on this base also need the unrelated template-picker fix in #759.

HostPort reconciliation also rechecks the recorded Node UID through the uncached reader immediately before StatefulSet mutation. A missing, deleting or replacement Node forces replicas to zero even while backup/restore ownership would retain them; a temporarily NotReady node may retain its existing running listener.

The same uncached GameServer endpoint and Node UID fence now runs inside sentinel Deployment mutation. Missing, deleting or replaced nodes stop an existing sentinel without rolling its pod template and cannot start a new listener.

CI installs Trivy v0.74.0 directly from its official GitHub release with bounded retries and a pinned SHA-256 checksum. The existing vulnerability scans and failure gates remain enabled.

Planning and Deployment mutation preserve an existing running listener on its original temporarily NotReady node, without starting or relocating a listener. Confirmed missing, deleting or replaced Node identities still stop it. Planner-to-mutation regressions cover both paths.

November 6 follow-up: The HostPort sentinel error string now satisfies ST1005; its corrected operator lint job passed before the dependency update. All six affected standalone Go modules now select github.com/klauspost/compress v1.20.2 to fix GO-2026-6865. Module and workspace checksums are included. The patch was independently reviewed; standalone Linux builds, affected feature builds and controller regression-source compilation passed. Runtime tests and security scans run in CI under repository policy.

Current validation: CI is running on 1a168b36 after the signed stack updates. Earlier green results apply to their recorded commits; this head still requires fresh CI verification.

Baylem and others added 19 commits October 21, 2026 11:14
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Baylem Baylem added area: chart Helm chart and deployment area: e2e kind-based end-to-end suite area: operator controller-runtime operator and CRDs area: optional-components sentinel, capture-sidecar, mcp-server, tunnel, audit-syslog-bridge, telemetry-receiver area: shared netguard, gameaction, gameproto, svcutil and other shared packages area: web React dashboard type: fix Bug fix labels Nov 5, 2026 — with ChatGPT Codex Connector
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

CI Report - 1a168b3

run 42180082176 - attempt 1

0 failed - 33 passed - 0 skipped - 169m17s elapsed

Test selection: full (selection-rule change) - per-suite table

Coverage

Module Measured Gate Margin
web L95.93 S94.44 B89.33 F91.9 L92 S92 B82 F76 +2.44

Changed

Area Files +/-
operator/ 13 +1065/-19
sentinel/ 4 +364/-22
test/ 5 +269/-7
i18n/ 1 +56/-0
.github/ 4 +40/-14
hack/ 2 +13/-2
deploy/ 1 +7/-4
api/ 2 +3/-3
mcp-server/ 2 +3/-3
tunnel/ 2 +3/-3
agent/ 2 +3/-2
telemetry-receiver/ 2 +3/-2
charts/ 1 +4/-0
(root) 1 +1/-0

Slowest jobs

Job Duration
e2e telemetry / arm64 (kind) 23m4s
e2e telemetry / amd64 (kind) 22m26s
build e2e images 16m7s
web e2e (mock) 15m21s
e2e operator / amd64 (kind) 13m37s

e2e buckets run

api-agent, api-auth, api-mods, api-rbac, api-roles, bot-fast, multicluster, operator, optional-components, postgres-availability, ratelimit, telemetry, upgrade, wake-hostport

Signed-off-by: Baylem <zelathis@gmail.com>
Select github.com/klauspost/compress v1.20.2 in all six affected standalone module graphs, including transitive consumers, and refresh their checksums.

Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Keep the historical compress go.mod checksum required when loading transitive workspace module metadata. The selected compress source remains v1.20.2.

Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>

This branch has not been deployed

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

Labels

area: chart Helm chart and deployment area: e2e kind-based end-to-end suite area: operator controller-runtime operator and CRDs area: optional-components sentinel, capture-sidecar, mcp-server, tunnel, audit-syslog-bridge, telemetry-receiver area: shared netguard, gameaction, gameproto, svcutil and other shared packages area: web React dashboard type: fix Bug fix

Projects

None yet

2 participants