Skip to content

Detached (Lambda-orchestrated) sweeps never verify spored on their members (#1305 follow-up) #1313

Closed

Description

@scttfrdmn

Found while doing #1305. That change makes the foreground fleet paths verify every member's spored: job arrays, MPI clusters, foreground sweeps, spawn resume and spawn burst. A member whose spored never comes up is terminated. Detached sweeps (spawn launch --param-file … --detach, run by the sweep-orchestrator Lambda) are not covered, so the #1298 failure mode is still open on that path.

Evidence (main @ 270bbb1, code trace only, not reproduced on AWS)

  • lambda/sweep-orchestrator/main.go tryLaunchInstanceSingleRegion (~L745) and tryLaunchInstance (~L1562) call RunInstances. They record the instance as pending and return. Nothing in the orchestrator reads spawn:last-heartbeat: grep -ni heartbeat lambda/sweep-orchestrator/*.go finds nothing.
  • The polling loops (runPollingLoop, runMultiRegionPollingLoop) count active instances by EC2 state only. A row whose guest never started spored is counted as running. It occupies a --max-concurrent slot until the TTL reaper reaches it, and it has no in-instance TTL, idle or cost-limit enforcement. This also assumes the reaper covers the region.

Suggested

The orchestrator already re-invokes itself on a polling tick. On each tick it could check every instance that has been running longer than the spored budget (5 min Linux, 10 min Windows; sporedVerifyTimeout in cmd/launch_posthook.go) and still has no spawn:last-heartbeat tag. Each such instance would be terminated and its row marked failed. That is the same rule #1305 applies in the CLI. The read is one DescribeInstances per region per tick, which the orchestrator already makes. Its cross-account role needs ec2:TerminateInstances on spawn:managed instances. Check whether it already has that before assuming a new grant.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions