Deletion and delete deadlines
Deleting a workstation removes it for good, with its virtual machine, its disk and everything on it, apart from one node-bound case.
Deleting a workstation removes it for good, with its virtual machine, its disk and everything on it, apart from one node-bound case. Anything you didn’t push elsewhere can’t be recovered. Ringleader can also delete a workstation at a deadline, with no client running.
Resources removed by deletion
A deletion removes the workstation, its virtual machine and its disk. The exception is a node-bound workstation that someone other than its owner deletes, which Node-bound workstation deletion describes.
To stop paying for a workstation while you keep its disk, stop it instead, as Starts, stops and restarts describes. To have Ringleader delete a workstation at a deadline, see Deletion deadline.
Deletion deadline
lifecycle.ttl deletes a workstation at a deadline measured from when it was created,
unless ttlAction: stop is set. Maximum run time
describes that older spelling. The delete removes the workstation and destroys its virtual machine and disk, exactly as
rl workstation delete does. A stop, a start or a restart doesn’t move the deadline.
Editing ttl is the one thing that moves it, and the new deadline applies at once.
Ringleader checks deadlines periodically, so a delete can come shortly after the deadline, as
Deadline enforcement
describes.
Deletion deadlines on a WorkstationConfig
rl apply rejects ttl on a WorkstationConfig. Lifetimes on a WorkstationConfig
gives the reason. Set ttl on each workstation that needs one.
Workstations in the Terminating phase
A workstation that’s being deleted is in the Terminating phase. Ringleader deletes its
virtual machine first, and keeps the workstation’s record until it can confirm the virtual
machine is gone.
If Ringleader can’t confirm, it keeps the record and tries again. That happens when the
provider can’t be reached, a cloud credential was revoked, or the configuration Ringleader
needed was already deleted. The workstation’s Ready condition then has reason
TerminatingFailed, and its message names the step that failed. This way, Ringleader never
loses track of a virtual machine without telling you.
Node-bound workstation deletion
A node-bound workstation runs on its owner’s computer, and Ringleader keeps its record. Who deletes the workstation decides what happens to its virtual machine:
- When its owner deletes it, the workstation stays in
Terminatinguntil the computer that runs it deletes the virtual machine. If that computer isn’t active,rl workstation deletesays so, and names the way out in Delete a computer that isn’t coming back. - When anyone else who may delete it deletes it, such as a namespace administrator, the record goes at once. The virtual machine stays on the owner’s computer as an orphaned workstation.
If the workstation is already in Terminating, Ringleader refuses anyone else’s delete, because
the owner’s computer may still be deleting the virtual machine. The refusal names
rl workstation release-finalizer,
which an administrator runs to remove the record anyway. The Ringleader application’s Delete
dialog says which of the two a delete does.
Delete a workstation
To delete a workstation in the application, open its card and click Delete. The dialog says what the deletion does and asks you to type the workstation’s name.
To delete it from the command line, run:
rl workstation delete my-box -n localrl asks you to confirm before it deletes, as
rl <kind> delete describes.
The command prints workstation/my-box is being deleted while the virtual machine
is still being removed. To wait until it’s gone, run:
rl workstation wait my-box --for Deleted -n localIn the terminal UI, press d on the workstation, as
Resource management shows.
Delete everything a file declares
To delete a workstation together with the configuration layers and other resources you
applied with it, pass the file to rl workstation delete:
rl workstation delete -f my-box.yamlThe command deletes every resource the file declares, whatever its kind, including WorkstationConfigs and Secrets.
Delete a workstation at a deadline
To delete a workstation, disk included, a week after you create it, set ttl:
spec:
lifecycle:
ttl: 7dPush anything you want to keep before the deadline. To give the workstation longer, edit
ttl and apply the file again.
Check when a workstation is deleted
The EXPIRES column of rl workstation get shows the next deadline. So does the
Deadline line of an open card.
Check when a workstation stops
describes both.
Release a workstation stuck in Terminating
If a workstation stays in Terminating because Ringleader can’t confirm its virtual machine
is gone, a namespace administrator can remove its record anyway.
The virtual machine can keep running
To release the workstation, follow these steps:
Run
rl workstation release-finalizerwith the workstation’s name:rl workstation release-finalizer my-box -n localRingleader refuses, and the refusal names the virtual machine you may leave behind.
Delete that virtual machine in your provider’s console, if you can reach it.
Run the command again, naming that virtual machine:
rl workstation release-finalizer my-box -n local \ --acknowledge-orphaned-machine my-box-7f3a91Ringleader removes the workstation’s record.
Next steps
- Starts, stops and restarts stops a workstation and keeps its disk, or stops one automatically.
rl <kind> deletelists every flag of the delete command.rl workstation release-finalizerlists the flags of the release command.- Orphaned workstations and recovery covers a virtual machine your computer keeps after its record is gone.