Skip to content
Spinbox is experimental: APIs change and data may be lost. Status lists what is built and what proves it.

Operating runners

View Markdown

Runners are also called hosts. An administrator manages them in Admin → Runners or with spin admin runner. For how runners join, scale and go away, see Runners and hosts.

Terminal window
spin admin runner list
spin admin versions # the control plane's release, and each runner's and its machine's

spin admin versions says what is running where. A runner’s page in the dashboard shows its state, its capacity and its workspaces.

Terminal window
spin admin runner drain <runner-id> # takes no new workspace; the running ones stay
spin admin runner drain <runner-id> --suspend # and moves the running ones off, with memory
spin admin runner activate <runner-id>

Drain a runner that should stop taking work for a while. It stays drained until someone activates it. If workspaces wait for a host while a runner is up, check that the runner is not drained: the waiting workspace says the connected runners take no new workspace.

A runner whose disk fills is also cordoned on its own, and uncordoned when it has room again (Placement). The automatic cordon never clears one a person set.

Terminal window
spin admin runner revoke <runner-id>

Revoke is for a machine that should never connect again, and cannot be undone. Taking a runner out, and bringing it back says what each action leaves behind, what a revoke refuses, and how the capacity comes back.

A runner of the group that should go for good is given back to it, which terminates the machine and is asked for one less. It drains as it goes, and one that is the only home of a workspace’s disk is refused, naming them:

Terminal window
spin admin runner remove <runner-id>
spin admin runner remove <runner-id> --taken

--taken is for a machine that may be compromised: its credentials are deleted and it is cut off before its group is asked anything, and every disk whose key it was given is marked for re-keying, as a revoke does. With --leave-workspaces as well, it goes even where workspaces’ disks are only there; each of those runs again only once it is recovered onto another runner.

After a revoke, or when a runner is wedged, terminate its instance without lowering the group’s size. The group starts another, which joins by its role:

Terminal window
aws autoscaling describe-auto-scaling-instances \
--query 'AutoScalingInstances[?AutoScalingGroupName==`<name>-runners`].[InstanceId,LifecycleState,HealthStatus]' \
--output table
aws autoscaling terminate-instance-in-auto-scaling-group \
--instance-id <i-...> --no-should-decrement-desired-capacity

If nothing is waiting for a host, the control plane may already have scaled the group to zero, and there is nothing to replace.

A workspace whose runner was revoked or is gone stops, in the record, and its owner moves it: see A workspace on a runner that is gone. The thresholds that let the control plane move them on its own are in the installation settings.

A machine that is not in the autoscaling group joins with a registration token:

Terminal window
spin admin token create --description "lab machine" --expires 1h

A token is one-time unless --reusable, lasts 24 hours unless --expires says otherwise (at most 30 days), and is shown once. --team makes a runner that only takes the team’s workspaces. The same flags set what the runner advertises and whether it is preemptible.

Such a machine needs KVM, and must run the control plane’s release of Spinbox: a host of any other is refused, and the refusal says so.

An administrator can open a root shell on a runner, for a while and with a reason.

Terminal window
spin admin shell open <runner-id> --reason "<why>" --minutes <minutes>
spin admin shell open <runner-id> --reason "<why>" --incident
spin admin shell list
spin admin shell approve <shell-id>
spin admin shell close <shell-id>
spin admin shell recording <shell-id>

The runner is emptied first: each workspace is suspended and resumed on another runner. With --incident the shell opens on the runner as it is. Where the installation sets host_shell_needs_approval, another administrator approves the shell before the runner is touched. Every session is recorded by the control plane and kept in the logs bucket under Object Lock.

Once the shell has ended, the runner is retired: it is revoked, every disk it held the key of is marked to be re-keyed, and its machine is replaced by its group.

A runner’s policy can carry a writeback bound of its own, measured on that host first.

Terminal window
spin admin runner policy <runner-id>
spin admin runner policy <runner-id> --writeback-limit-bytes <bytes> --writeback-background-bytes <bytes>

With no flags the command shows the policy. Any flag writes the whole policy: a setting you do not pass goes back to the runner’s own default. Thresholds that no preset names are refused until that host has been tested with them. The test is TestHostWriteback, and it loads the host’s disk while it runs.

Installations run Spinbox v20261027.01; the reference is generated from spin v20261114.01 (51f7e0dea). This page as Markdown, for a model or a terminal.