Repository navigation
Description
Found while doing #1336.
#1336 makes a launch refuse a tag set over AWS's 50-tag limit, counting the tags spawn's own launch code adds after RunInstances (a Spot instance's spawn:spot-price-per-hour, an ephemeral FSx's four mount tags). It does not reserve room for the tags spored writes on the instance later, and a launch at exactly 50 is still allowed (the documented monitoring setup on a maximal launch lands at exactly 50, TestMonitoringSettingsFitOnAMaximalLaunch).
spored adds these keys, none of which buildTags writes, with CreateTags on the instance (found by grepping every CreateTags( in pkg/agent, pkg/provider, cmd/spored):
| key | writer | what depends on it |
|---|---|---|
spawn:compute-seconds |
pkg/agent/computecheckpoint.go putComputeSecondsTag |
the cost limit across stop/start: agent.go ~l.788 uses computeSecondsBase from this tag so the cost clock does not reset on resume |
spawn:last-heartbeat |
pkg/agent/agent.go writeHeartbeatTag (_, _ =, error dropped) |
reaper classifyHeartbeat (#682); sweep orchestrator spored verification (#1313) |
spawn:spored-version |
agent.go WriteVersionTag |
version-skew visibility |
spawn:logged-in-count |
agent.go writeSessionCountTag |
idle detection display |
spawn:ebs-hourly-cost, spawn:public-ipv4-count, spawn:elastic-ipv4-count |
pkg/provider/ec2.go footprint (_, _ =) |
cost footprint |
spawn:flush-status |
pkg/agent/taskflush.go |
task flush visibility (#1186) |
spawn:ready-status / spawn:ready-url, spawn:fsx-dra-status/-error, DCV tags |
agent.go, webready.go, fsx_mount.go |
app readiness, FSx mount |
EC2 documents a hard 50 user tags per resource, and CreateTags that would exceed it fails the whole call (TagLimitExceeded). Not verified against live AWS (no AWS calls in this task).
Consequence on an instance launched at 50 tags: every one of these writes fails. The worst is spawn:compute-seconds: with it unwritable, a stop/start resets the cost clock, so an instance that is resumed repeatedly can exceed --cost-limit (the reset trap the tag exists to avoid). A missing spawn:last-heartbeat is classified "unknown", not "stale", so it fails quiet rather than terminating anything, but #1313's detached-member verification terminates a member with no heartbeat after 5 minutes.
Options: (a) reserve headroom in postLaunchTags for the always-written spored keys (at least compute-seconds, last-heartbeat, spored-version; 3 slots would make the documented monitoring setup on a maximal launch refuse, so the docs/test would need to change); (b) have spored, when at the limit, delete a droppable tag (spawn:param:*) to make room for a functional one; (c) both. Owner decision needed on how many slots to reserve.
Activity
scttfrdmn commentedon Oct 27, 2026
Likely resolved by #1359, which moves launch-fixed settings out of tags. That frees enough room to reserve slots for spored's runtime tags without making the documented monitoring setup refuse. Decide the reserve count together with #1359, not before it.
test(tags): size the no-room launch without assuming a reserve, so a …
feat(tags): reserve a slot for every tag spored writes after launch (#…
test(tags): size the no-room launch without assuming a reserve, so a …
Reserve a tag slot for every tag spored writes after launch (#1355) (#…