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
When spawn launch --user-data-file is used, spored's own install script races with the user-data execution. The result: spored fails to install with "Text file busy", and cloud-init marks the entire user-data script as failed.
Log evidence
From /var/log/cloud-init-output.log on a freshly launched instance:
Warning: Failed to open the file /usr/local/bin/spored: Text file busy
curl: (23) client returned ERROR on write of 16384 bytes
Failed to download spored binary
cc_scripts_user[WARNING]: Failed to run module scripts-user
Root cause
spawn installs spored as part of its bootstrap process, which runs concurrently with cloud-init's execution of user-data scripts. When the bootstrap tries to write the new spored binary to /usr/local/bin/spored, the old spored binary is already executing (installed from a previous run or baked into the AMI), causing the "Text file busy" error.
Expected behaviour
spawn's bootstrap should complete before user-data scripts are allowed to run, or at minimum should not fail when spored is already installed and running.
Workaround
Add a sleep 30 at the top of user-data scripts to let the bootstrap settle. This is fragile and adds unnecessary latency.
Fixed in #28 (merged to main): spored now installs via temp-file + atomic mv (no ETXTBSY over a running binary), and custom user-data runs under set +e so a bootstrap warning no longer fails the whole cloud-init script. Ships in the next release.
Activity
fix: spored install race (#27) and single-instance --check-complete (#26
scttfrdmn commentedon May 31, 2026
Fixed in #28 (merged to main): spored now installs via temp-file + atomic
mv(no ETXTBSY over a running binary), and custom user-data runs underset +eso a bootstrap warning no longer fails the whole cloud-init script. Ships in the next release.