Skip to content

Command · pk-metal

pk-metal retry

changes machinesneeds the cluster

pk-metal retry removes a HostOperation that failed or that a person aborted. The operator then proposes the same plan again, and the new operation waits for approval.

pk-metal retry [-n namespace] <operation> | <namespace>/<operation>
<operation>
The name of the operation, as pk-metal status prints it: pk-metal/<name>, or the name only with -n.
FlagDefaultDescription
-n<string>pk-metalNamespace of the operation.

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

The command does not ask. It has no --yes.

A failed operation stays in the cluster, so that you can read why it failed. While it is there, the operator does not try again.

  1. The command reads the operation. It refuses an operation that is not Failed or Aborted.
  2. It prints why the operation failed.
  3. It deletes the operation.
  4. The operator proposes the same plan again in a few seconds.
  5. The new operation waits for approval. Approve it with pk-metal approve.

Two cases are different:

BIOS or firmware proposal
The command does not delete the operation. It sets the annotation metal.platform-kit.org/retry, and the operator replaces the operation. If you delete such a proposal, the operator reads this as a refusal.
Operation that the operator does not propose again
The command deletes the operation. Then it tells you how to make the operation again. Refer to the table below.
Operation What the command tells you
A reboot from pk-metal reboot Run pk-metal reboot <node> again. If the drain step failed, it adds --drain-timeout 30m.
A step of a TalosRollout Read the rollout with pk-metal rollout show. To make the change again, delete the rollout.
A repair from pk-metal restore Run pk-metal restore plan <cluster> --propose again.
A different operation that a person made Make it again if you still need it.

If the claim is on hold, the operator proposes nothing until you run pk-metal unhold. The command tells you.

pk-metal retry
pk-metal retry pk-metal/provision-simhw2288v5000398-5e6f7a8b
operation pk-metal/provision-simhw2288v5000398-5e6f7a8b failed: step 5/6 awaitCheckIn: TalosNode cp-2 did not report in within 30m
deleted pk-metal/provision-simhw2288v5000398-5e6f7a8b.
The operator proposes it again for claim default/cp-2 in a few seconds; it then waits for approval: pk-metal approve

To stop the operator from a new proposal, hold the claim before you retry.

Terminal window
pk-metal hold --reason "disk fault" default/cp-2
Object Access Purpose
HostOperation get, list, delete Reads the result and deletes the operation.
HostOperation patch Sets metal.platform-kit.org/retry on a BIOS or firmware proposal.
HostClaim get Finds if the claim is on hold.
CodeMeaning
0Success.
1Error; the message is on stderr, as "pk-metal: <message>".