Skip to content

upgrade-spored: linux/arm64 v0.100.1 download 403s (regional bucket missing v0.100.1, us-east-1 fallback denied) — blocks picking up the #502 fix without a relaunch #509

Closed

Description

@scttfrdmn

Summary

spawn upgrade-spored fails for linux/arm64 on v0.100.1: the regional bucket has no v0.100.1, the us-east-1 fallback 403s, and the upgrade aborts. The artifact exists on the GitHub release (spored_0.100.1_linux_arm64.tar.gz), so this is a distribution/naming gap between the release and the bucket layout upgrade-spored reads — same family as #440 / #462, but on the upgrade path rather than bootstrap.

This currently blocks picking up the #502 fix on already-running instances, which is the one path that doesn't require relaunching.

Reproduction

$ spawn upgrade-spored i-08efa17ed1bb2f099 -y
Looking up instance i-08efa17ed1bb2f099...
Upgrade spored on i-08efa17ed1bb2f099: vunknown → v0.100.1
ℹ️ upgrading spored over SSM (this stops + restarts the agent)...
upgrade failed (Failed):
Regional bucket missing v0.100.1; trying us-east-1...
curl: (22) The requested URL returned error: 403
Failed to download spored v0.100.1 (spored-linux-arm64)
failed to run commands: exit status 1
  • Instance: i-08efa17ed1bb2f099, c8g.48xlarge (arm64, Graviton4), us-east-1, account 942542972736, AL2023
  • spawn v0.100.1 (Homebrew, macOS arm64); spored on the instance v0.100.0, installed at launch 2026-08-17T22:30Z
  • SSM was fine — the command ran on the instance and its output came back, so this is purely the download

The asset the script asks for is spored-linux-arm64 (no version, no .tar.gz), whereas the release publishes spored_0.100.1_linux_arm64.tar.gz. Both v0.100.0 and v0.100.1 have the complete arm64 set on the release:

spored_0.100.1_linux_arm64.tar.gz  15064275
spored_0.100.1_linux_arm64.deb     15058468
spored_0.100.1_linux_arm64.rpm     15050765

Worth checking whether amd64 v0.100.1 is present in the buckets and only arm64 is missing, or whether v0.100.1 didn't publish to any regional bucket — the message distinguishes "regional bucket missing v0.100.1" from the subsequent us-east-1 403, so the fallback bucket may be a permissions problem rather than an absence.

Two smaller things in the same output

  1. vunknown → v0.100.1. upgrade-spored can't read the installed version, while spawn status on the same instance reports spored: v0.100.0 and the binary agrees (/usr/local/bin/spored --version → spored version 0.100.0). Since --allow-downgrade is gated on comparing the two, a version that reads as vunknown presumably can't be compared — worth confirming the downgrade guard still holds in that state.
  2. The failure is fail-safe, which is good, and worth keeping in a test. After the failed upgrade, spored was still active/enabled at 0.100.0 with a journal containing only its original Started spored.service line from 22:31:16 — the download failure happens before the swap, so the "stops + restarts the agent" warning never came due. No leftover temp files.

Operational warning worth documenting on the upgrade path

On a #502-affected instance, upgrade-spored is not just a version bump — it is the moment a disarmed agent becomes armed, and it will act on config that may be hours stale.

Concretely, on all seven instances in this fleet: /tmp/SPAWN_COMPLETE exists (written 01:42–02:06Z by a job that finished), and the tags say spawn:on-complete=terminate, spawn:completion-file=/tmp/SPAWN_COMPLETE, spawn:completion-delay=30s. The nodes were then deliberately reused for new multi-hour work. They are alive at 06:30Z only because spored can't read its tags. A successful upgrade-spored — or #503's role heal on relaunch — would have terminated four nodes running live jobs within 30 seconds of the agent coming up, acting on a sentinel from 4½ hours earlier.

That's arguably correct behaviour given the tags, but it means "upgrade the agent" and "terminate the instance" are the same action on a #502-affected instance, with nothing in the confirmation prompt saying so. Two cheap mitigations: have upgrade-spored report the config it is about to start enforcing (deadline, completion-file present yes/no, idle rule) in the confirmation prompt, and/or refuse-with-warning when the completion file already exists at upgrade time. I cleared the sentinels by hand before going further.

Environment

Activity

  1. scttfrdmn commented on Aug 19, 2026

    @scttfrdmn
    ContributorAuthor

    Verified fixed by #510's bucket-policy widening. Closing without new code, per the issue's own instruction to verify directly rather than assume.

    Direct verification performed:

    1. Curled the versioned S3 paths for the exact artifact upgrade-spored requests (spawn/versions/<v>/spored-linux-<arch>) across regions:

      spawn-binaries-us-east-1  / spawn-binaries-us-east-2  / spawn-binaries-us-west-2  / spawn-binaries-eu-west-1
      

      for both v0.100.1 and v0.100.2, arm64 and amd64 — all HTTP/1.1 200 OK, including the matching .sha256 objects.

    2. Live end-to-end test on a real instance (not just curl): launched a disposable t4g.micro (arm64) in us-east-1 via spawn launch --ttl 20m (i-0877092ff63251ac5, launched at v0.100.2), then ran:

      spawn upgrade-spored i-0877092ff63251ac5 --version 0.100.1 --allow-downgrade -y
      

      which succeeded — downloaded, checksum-verified, and swapped the exact v0.100.1 linux/arm64 binary that 403'd in the original report — followed by upgrading back to v0.100.2, which also succeeded. Both runs correctly printed v0.100.1 → v0.100.2 (and v0.100.2 → v0.100.1), reading the running version from the spawn:spored-version tag rather than vunknown — so the smaller "vunknown" symptom noted in this issue does not reproduce on a normally-launched instance; it was specific to the CRITICAL: launch --iam-policy-file omits the spored baseline policy — TTL, --on-complete and --pre-stop all silently dead (the #406 fix covers 2 of 3 role paths) #502-affected fleet where spored itself could never write that tag in the first place (DescribeTags/CreateTags denied), which is now fixed separately by CRITICAL: launch --iam-policy-file omits the spored baseline policy — TTL, --on-complete and --pre-stop all silently dead (the #406 fix covers 2 of 3 role paths) #502/upgrade-spored: versioned S3 path (spawn/versions/<v>/spored-linux-*) is 403 in 4 of 11 regional buckets, including the us-east-1 fallback #510.

    3. Instance terminated immediately after (spawn terminate ... --yes) and confirmed terminated via aws ec2 describe-instances. No leaked resources.

    The two smaller/optional items in this issue (warn on stale sentinel file before arming a disarmed spored; the vunknown-vs-known-version discrepancy) are not being addressed here — the second no longer reproduces on a healthy instance, and the first (confirmation-prompt warning about /tmp/SPAWN_COMPLETE already existing) is a reasonable follow-up but distinct from this issue's core distribution bug. Happy to file that separately if wanted, but leaving it out of scope for this close-out per the task's guidance to only write new code where the issue's core claim still holds.

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions