Skip to content

SSM-first Linux launch/connect (#1296); terminate on failed launch by default (#1298) - #1303

Merged
scttfrdmn merged 2 commits into
mainfrom
feat/1296-ssm-first
Oct 25, 2026
Merged

scttfrdmn merged 2 commits into
mainfrom
feat/1296-ssm-first

Conversation

@scttfrdmn

@scttfrdmn scttfrdmn commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1296
Fixes #1298

SSM-first Linux access (owner decision: option 2, no security groups created).

  • spawn launch (Linux) no longer waits for SSH by default (--wait-for-ssh now defaults off). spored is verified either way, via the existing heartbeat-tag / SSM path, which never needed SSH. An explicit --wait-for-ssh=false keeps its documented "skip both" meaning, which the e2e harness and scripts rely on to return right after RunInstances.
  • --wait-for-ssh waits as before, except that when no attached security group can admit tcp/22 the launch says so at once, naming the groups and pointing at spawn connect (SSM) or --security-group-ids. The check is generous: any ingress rule covering tcp/22 or all traffic, from any CIDR, IPv6 range, prefix list or other group, counts as possibly reachable. The one source not counted is a group referencing itself. That is the stock default-VPC rule, and a self-reference never matches traffic to a public IP. A failed read (for example, DescribeSecurityGroups denied) decides nothing.
  • A default launch whose groups admit no SSH prints a short note and drops the ssh user@<dns> line from the summary.
  • spawn connect (Linux): when the groups admit no SSH, it goes straight to SSM, before any key lookup or injection. --ssh (previously Windows-only) forces SSH. A one-shot -- <cmd> on such an instance fails at once with the reason, because the SSM path is an interactive session that would ignore the command.
  • Windows is unchanged.
  • Steps 10/10b of launch moved into runPostLaunchChecks (cmd/launch_postchecks.go) with a call-counting seam. New aws.InstancePortIngress / EvaluatePortIngress (api snapshot updated).

Second commit: #1298, terminate on a failed launch by default

This is in the same PR because it changes the same post-launch code.

  • launchWithProgress now has a named err and defers finishLaunch before RunInstances, so every return after the instance exists is covered. Any failure after RunInstances terminates the instance by default: spored not up or not verifiable, WaitForRunning, the public-IP lookup, the ephemeral FSx, or anything else. The ephemeral FSx the launch created is deleted with it. Cleanup runs on a context detached from the launch's, bounded at 2 min.
  • --keep-on-error keeps the instance and warns that it has no TTL/idle/cost-limit enforcement. --terminate-on-error is still accepted and deprecated (it is now the default). --terminate-on-error=false keeps the instance, as it always did. Passing both is an error.
  • Reaper warning: every launch now warns when the probe positively finds no reaper scanning the launch region. Inconclusive probes stay silent. The probe is now asked about config.Region (--region), not the client's default region.
  • Job-array, sweep and burst launches do not share the post-launch verification, so they are unchanged. The job-array cohort already drains on failure. See the follow-up issue for the gaps that remain there.

@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

@scttfrdmn scttfrdmn changed the title SSM-first Linux launch/connect: no SSH wait by default, immediate port-22 verdict (#1296) SSM-first Linux launch/connect (#1296); terminate on failed launch by default (#1298) Oct 25, 2026
…1296)

spawn launch no longer waits for SSH unless --wait-for-ssh is given, and
verifies spored either way. A requested wait is refused at once when no
attached security group can admit tcp/22. spawn connect goes straight to
SSM when the groups admit no SSH. Windows unchanged.
…ep-on-error (#1298)

A launch that fails once the instance exists (spored never came up,
WaitForRunning, public-IP lookup, ephemeral FSx, anything else) now
terminates the instance and its ephemeral FSx by default. --keep-on-error
keeps it with a no-safety-net warning; --terminate-on-error is deprecated.
Every launch warns when no reaper positively scans the launch region.
@scttfrdmn
scttfrdmn force-pushed the feat/1296-ssm-first branch from 9104f34 to ef6cc2c Compare October 25, 2026 05:31
@scttfrdmn
scttfrdmn merged commit 76289f1 into main Oct 25, 2026
9 checks passed
@scttfrdmn
scttfrdmn deleted the feat/1296-ssm-first branch October 25, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant