About machine health checks on bare metal
Machine deletion on bare metal cluster triggers reprovisioning of a bare metal host. Usually bare metal reprovisioning is a lengthy process, during which the cluster is missing compute resources and applications might be interrupted.
There are two ways to change the default remediation process from machine deletion to host power-cycle:
-
Annotate the
MachineHealthCheckresource with themachine.openshift.io/remediation-strategy: external-baremetalannotation. -
Create a
Metal3RemediationTemplateresource, and refer to it in thespec.remediationTemplateof theMachineHealthCheck.
After using one of these methods, unhealthy machines are power-cycled by using Baseboard Management Controller (BMC) credentials.
- About the annotation-based remediation process
-
The annotation-based remediation process performs the following steps:
-
The MachineHealthCheck (MHC) controller detects that a node is unhealthy.
-
The MHC notifies the bare metal machine controller which requests to power-off the unhealthy node.
-
After the power is off, the node is deleted, which allows the cluster to reschedule the affected workload on other nodes.
-
The bare metal machine controller requests to power on the node.
-
After the node is up, the node re-registers itself with the cluster, resulting in the creation of a new node.
-
After the node is recreated, the bare metal machine controller restores the annotations and labels that existed on the unhealthy node before its deletion.
If the power operations did not complete, the bare metal machine controller triggers the reprovisioning of the unhealthy node unless this is a control plane node or a node that was provisioned externally.
-
- About the metal3-based remediation process
-
The metal3-based remediation process performs the following steps:
-
The MachineHealthCheck (MHC) controller detects that a node is unhealthy.
-
The MHC creates a metal3 remediation custom resource for the metal3 remediation controller, which requests to power-off the unhealthy node.
-
After the power is off, the node is deleted, which allows the cluster to reschedule the affected workload on other nodes.
-
The metal3 remediation controller requests to power on the node.
-
After the node is up, the node re-registers itself with the cluster, resulting in the creation of a new node.
-
After the node is recreated, the metal3 remediation controller restores the annotations and labels that existed on the unhealthy node before its deletion.
If the power operations did not complete, the metal3 remediation controller triggers the reprovisioning of the unhealthy node unless this is a control plane node or a node that was provisioned externally.
-