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
spored installs but does not self-terminate on TTL (systemd unit crash-loops) #19
Found during the #2 unattended-TTL observation. The bootstrap fixes (#18) work — spored installs and executes — but the instance did not self-terminate on its TTL.
18:27:41 LAUNCHED deadline=18:32:38
18:32:42 state=running (+0.1m past deadline)
...
18:36:44 state=running (+4.1m past deadline) → backstop terminated it
Still running 4+ minutes past the TTL. Backstop cleaned up; leak-checked clean.
Diagnosis from console output
✅ Bootstrap ran: Created symlink … spored.service, spored binary present at /usr/local/bin/spored, systemd started it — so arch detection, the S3 download, checksum, and install (Real-AWS bootstrap fix + launch validation (#2, #17) #18) all work.
❌ The spored systemd unit crash-loops: a repeating unit=spored … res=success then res=failed cycle every ~5s (matches Restart=always RestartSec=5). The daemon isn't staying up long enough to enforce the TTL.
⚠️SELinux avc: denied on /usr/local/bin/spored — the binary carries the cloud_init_tmp_t context because the bootstrap mvs it from a /tmp mktemp file, inheriting tmp's label. It's permissive=1 (AL2023 default) so exec is allowed here, but on an enforcing host it would be blocked; the label is wrong regardless and should be restorecon'd.
Likely causes (need journald/SSM to confirm the exact spored error)
spored erroring on startup (config/region/IMDS/tag-read) and exiting non-zero → restart loop. Console shows no spored app logs (it logs to journald).
The SELinux mislabel (fix: restorecon -v /usr/local/bin/spored or install to the final path with the right context, not via /tmp rename).
Next step
Needs a diagnostic run with SSM Session Manager (the spored-instance-profile already has AmazonSSMManagedInstanceCore) to read journalctl -u spored and get spored's actual exit error, then fix. Blocks #2's "observe auto-terminate" acceptance. spawn-ts's install path is validated; this is a spored-runtime / bootstrap-labeling issue.
Fixed in #20. Root cause: the systemd unit ran spored run (unknown subcommand → non-zero exit → crash-loop). Unit now matches the Go bootstrap byte-for-byte (bare spored, Type=simple, Restart=on-failure). Validated: t4g.nano self-terminated on its 5-min TTL, unattended. The SELinux tmp-label observation was moot once the unit stopped crash-looping (AL2023 permissive; binary runs), but worth a follow-up restorecon if we ever target enforcing hosts.
Activity
fix: match Go's spored systemd unit so it self-terminates on TTL (#19, …
scttfrdmn commentedon Jul 21, 2026
Fixed in #20. Root cause: the systemd unit ran
spored run(unknown subcommand → non-zero exit → crash-loop). Unit now matches the Go bootstrap byte-for-byte (barespored, Type=simple, Restart=on-failure). Validated: t4g.nano self-terminated on its 5-min TTL, unattended. The SELinux tmp-label observation was moot once the unit stopped crash-looping (AL2023 permissive; binary runs), but worth a follow-up restorecon if we ever target enforcing hosts.release: 0.3.0 (#21)
feat: orphan / zombie reaper (#23) (#31)
feat: gated live smoke test — self-termination regression guard (#27) (…