Skip to content

Keep the game reachable until its Service-backed wake sentinel can accept joins #966

Open

Description

@Baylem

When an idle game goes to sleep, the operator can stop it while the advertised Service still selects the game. If the replacement sentinel is Pending, an image pull stalls, or quota prevents its Pod from starting, there is no listener to accept a player or request a wake. A player joining the still-running game between the idle decision and the routing change can also be stopped.

Audited master 7c71eca7bcdf20c2a3f634277d0005e2b9221ea0. This finding was traced through the source. The cluster scenario below is a proposed regression test.

The sleep plan checks the sentinel Deployment's Ready replicas to pick the Service selector. The same reconcile still calls desiredReplicas with idleAsleep. That path issues the stop sequence or returns zero immediately for templates without one. The sentinel container has no readiness probe that establishes that its enabled TCP and UDP listeners have bound. Once the sleep marker is set, idleDecide returns asleep before it consults a fresh occupied heartbeat. Sentinel plan · Service update and replica decision · Stop path · Sentinel container · Idle decision

Reproduce on a disposable cluster

  1. Enable idle sleep and wake-on-connect on a Service-backed game that reports player counts. Leave its game Pod ready and make only the waker unschedulable, for example with a missing auxiliary-pool selector.
  2. Let the empty interval expire. Observe game process/replicas, Service selector and EndpointSlices while joining through the advertised endpoint.
  3. In a second run, deliver a fresh positive player count after sleep preparation begins but before routing changes. Repeat with a waker that reaches Running before all listeners are bound.

Acceptance criteria

  • Keep the game serving until the replacement has bound all configured listeners and routing has converged to a reachable sentinel. Report why a pending handoff is blocked.
  • A fresh occupied heartbeat before cutover cancels sleep preparation. Keep manual suspension and lifecycle ownership semantics intact.
  • A Service-level test observes the public endpoint across both transitions with a delayed waker. Verify the distinct Hostport release-and-reconnect path still works.

Related work fixed the Hostport node/port handoff (#730, #840) and provided auxiliary-pool placement (#876, #910). This case uses ClusterIP, NodePort or LoadBalancer during the transition to sleep.

Activity

  1. added
    type: fix
    area: operator
    area: e2e
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: e2earea: operatortype: fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions