Disruption

A Disruption is one request to take one machine out of service: a reboot, or a restart of k3s. machine-operator files one for the changes it stages, and liken request-reboot files one for a person. kubectl get disruptions lists every request, who asked for it, and whether it is approved, granted, and held. A request with spec.hold stops the turn after the drain, so the component that filed it can work on the drained machine before the reboot. How liken works explains how a request becomes a reboot turn, and a MachineDisruptionBudget sets how many machines take a turn at the same time.

A Disruption asks for one machine to reboot or to restart k3s. The request waits until its machine’s rebootPolicy approves it and every MachineDisruptionBudget that selects the machine has room, and then the machine takes a turn: cluster-operator records the turn in the Cluster’s status.rebootTurns, and machine-operator drains the machine and reboots it. Every request pending for a machine when it takes its turn shares the one drain and the one reboot.

spec

The request: which machine, who asks, what for, and the approval of a machine whose rebootPolicy is Manual.

Field Type Required Description
machine string yes The name of the Machine to take out of service. It does not change after the request is created.
requester string yes Who asked: a key with a domain prefix for a program, such as liken.sh/machine-operator, and the Kubernetes user name for a person. It does not change after the request is created.
kind string yes Reboot reboots the machine. Restart restarts k3s and nothing else, so the pods keep running and the machine is not drained. A reboot covers a restart, so a machine with both pending only reboots. One of: Reboot, Restart.
reason string no Why the machine goes out of service, for the person who reads the request.
hash string no What the request applies. For machine-operator’s request, the hash of the documents it staged. For a person’s reboot, the identity of the boot it was filed against, so the request is spent when the machine boots again.
approvedHash string no The approval of a machine whose rebootPolicy is Manual. The request is approved while this names spec.hash, as the full hash or a prefix of 12 characters or more. When the request changes to apply other bytes, its hash changes and the approval no longer matches. liken approve-reboot sets it. A machine whose rebootPolicy is Auto approves every request and ignores this field.
hold boolean no Stops the machine’s turn after the drain and before the reboot. When the machine is drained, machine-operator sets the Held condition to True, and the requester does its work on the machine from a pod that tolerates the cordon. The requester removes hold when it has checked its work, and the machine reboots. A hold has no deadline: until it is removed, the machine stays drained, and the budgets that select it stay full. A person who removes hold releases the turn.
keepBootNext boolean no Says that the requester set the firmware’s BootNext for this request’s reboot, such as fwupd’s updater for a UEFI capsule. The requester sets BootNext while it holds the drained machine, and sets this field when it removes hold. On that reboot, init leaves BootNext as it finds it and arms no release trial, so the firmware boots the requester’s entry once, and a staged release takes a later reboot. Init refuses, and aims BootNext at the proven slot as on any reboot, unless the machine’s status.firmware.bootOrderKept is true, BootNext does not name the slot that is not proven, and the proven slot holds its fallback loader.

status

Where the request stands.

Field Type Required Description
conditions []object no Approved, written by cluster-operator, is True when the machine’s rebootPolicy or approvedHash approves the request. Granted, written by cluster-operator, is True while the machine’s turn in the Cluster’s status.rebootTurns names the request, and its message names what a waiting request waits for. Complete, written by machine-operator, is True when a person’s reboot has happened. Held, written by machine-operator, is True from the end of the drain until the requester removes spec.hold. machine-operator deletes its own request when nothing is staged, and cluster-operator deletes a complete request a day after it completed.

status.conditions[]

Approved, written by cluster-operator, is True when the machine’s rebootPolicy or approvedHash approves the request. Granted, written by cluster-operator, is True while the machine’s turn in the Cluster’s status.rebootTurns names the request, and its message names what a waiting request waits for. Complete, written by machine-operator, is True when a person’s reboot has happened. Held, written by machine-operator, is True from the end of the drain until the requester removes spec.hold. machine-operator deletes its own request when nothing is staged, and cluster-operator deletes a complete request a day after it completed.

Field Type Required Description
type string yes
status string yes One of: True, False, Unknown.
observedGeneration integer no
lastTransitionTime string yes
reason string yes
message string no