Skip to content

Windows launches silently drop --command and --user-data #1022

Closed

Description

@scttfrdmn

Found while working on #1007 (PR #1021). Read from the code, not reproduced live.

buildUserData (cmd/launch_config.go) returns buildWindowsUserData(publicKey) for TargetOS == "windows" before it resolves --user-data / --user-data-file and before the Command embedding. buildWindowsUserData takes only the authorized key. So on Windows:

  • --command is never embedded. A command of 256 characters or fewer still gets the spawn:command tag (pkg/aws/tags.go), but on Linux only the bash bootstrap reads that tag. Neither the PowerShell bootstrap nor spored does.
  • --user-data / --user-data-file are ignored.

I found no preflight that rejects these flags with --os windows (windowsLifecycleGuard checks only for a timeout). So the launch succeeds, and the workload never runs. If --on-complete was set, it never fires, and the instance bills until its TTL.

Fix: either reject --command/--user-data for Windows in preflight (and in --dry-run), or implement them in the PowerShell bootstrap. If they are implemented, gate the start on spored is-spot-replacement exiting 0, the way the Linux bootstrap does after #1021. Otherwise a Spot replacement re-runs the workload.

Activity

  1. added
    bug
    area:windows
    on Oct 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:windowsbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions