Skip to content

Command · pk-metal

pk-metal wipe

changes machinesneeds the cluster

pk-metal wipe asks for a wipe of one released machine. The operator proposes an operation that boots a Talos image, and that image erases the system disk. A person approves it.

pk-metal wipe [--talos-version v] <host>
<host>
The name of the Host.
FlagDefaultDescription
--talos-version<string>-Talos version of the wipe image (default: the version of the node's cluster).

This command also accepts the global flags --kubeconfig and --context.

Usually, the operator resets a machine through Talos when it releases the Host. If the node did not answer at that time, the operator could not reset it. The disk can still hold the node, with the credentials of its cluster.

The operator then marks the Host:

  • The annotation metal.platform-kit.org/disk-not-wiped names the cluster and the node.
  • The condition DiskWiped is False.
  • The operator installs nothing on the Host until the wipe is complete.
  1. The command reads the Host. It refuses a Host that has no such mark.
  2. It finds the Talos version for the wipe image. The default is the version of the cluster that the node was in.
  3. It sets the annotation metal.platform-kit.org/wipe on the Host. The value is the Talos version.
  4. The operator proposes a HostOperation with the reason Wipe. Approve it with pk-metal approve.
  5. The operation boots the image. The image erases the system disk and stops there.

If the cluster of the node does not exist, give the version with --talos-version.

pk-metal wipe
pk-metal wipe simhw2288v5000400
host simhw2288v5000400: wipe asked for (it may still hold node lab/w-1).
The operator proposes an operation that boots a Talos v1.14.6 image which erases the system disk; approve it with: pk-metal approve

A Host that the operator reset through Talos needs no wipe.

pk-metal wipe
pk-metal wipe simhw2288v5000399
pk-metal: host simhw2288v5000399 is not marked as holding an install (metal.platform-kit.org/disk-not-wiped); a release that reset it through Talos wiped it already
Object Access Purpose
Host get, patch Reads the mark. Sets the annotation metal.platform-kit.org/wipe.
TalosCluster get Reads the Talos version, when you do not give --talos-version.
CodeMeaning
0Success.
1Error; the message is on stderr, as "pk-metal: <message>".