Skip to content

launch should fail if spored fails to install on the instance #50

Closed

Description

@scttfrdmn

Summary

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

  1. added
    bug
    on Jun 3, 2026
  2. added
    area:spored
    area:launch
    on Jun 12, 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:launcharea:sporedbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions