You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
launch should fail if spored fails to install on the instance #50
If spored fails to install during instance bootstrap, spawn launch still reports success — the user gets a "running" instance that has no lifecycle agent (no TTL enforcement, no idle stop, no completion handling, no spawn status/connect spored features). This is also a cost-control hole: an instance with no spored has no TTL safety net (see the 12-day leak in #47).
Current behavior
The bootstrap user-data installs spored under set -e and exit 1s on failure (cmd/launch.go:1957,1988,2020,2032). But that runs asynchronously on the instance via cloud-init — spawn launch has already returned success right after RunInstances. So a spored install failure (bad S3 download, checksum mismatch, arch mismatch, network) is invisible to the caller.
Expected
A launch that waits for readiness should verify spored actually came up and fail (and optionally auto-terminate the instance) if it didn't — rather than leaving a silently-agentless, TTL-less instance running.
Proposed approach
When --wait-for-ssh/readiness is on, after SSH is reachable, probe spored (e.g. sudo systemctl is-active spored or spored status) within a timeout.
If spored isn't healthy: surface a clear error, and terminate the instance (it's unmanageable and would leak). Make the terminate-on-failure behavior the default for a failed bootstrap; a flag could opt out for debugging.
Consider a cloud-init completion signal spored writes on successful start that launch can poll for.
Context
Found while reviewing instance-lifecycle robustness. Ties into the cost-control safety net (#47): an agentless instance is exactly the kind that leaks.
Activity
fix: replace the sleeps that were waiting on AWS state (#752 items 2-…