Restart the inspection of a bare metal host¶
You can use the Container Cloud API to restart an inspection of a bare metal host in MOSK clusters. For example, this procedure is useful when hardware was changed. This works for bare metal hosts that were not provisioned yet or were successfully deprovisioned.
The workflow of the reinspection procedure desribed above is as follows:
Ensure that the
BareMetalHost
object is not bound to anyMachine
object and it is in theavailable
state.Edit the
BareMetalHost
object to initiate an inspection of the bare metal server that hosts the node.
To restart the inspection of a bare metal host:
Using
kubeconfig
of the management cluster, access the Container Cloud API and inspect theBareMetalHost
object:kubectl -n <project-name> get baremetalhost <bare-metal-host-name>
Example of the system response:
NAME STATE CONSUMER ONLINE ERROR AGE ... managed-worker-a-storage-worker preparing managed-worker-a-storage-worker false 5d3h managed-worker-b-storage-worker preparing managed-worker-b-storage-worker false 5d3h managed-worker-c-storage-worker available false 5d3h
In the system response above, the
managed-worker-c-storage-worker
bare metal host is in theavailable
state and has noconsumer
(not bound to anyMachine
). Therefore, you can reinspect it.Open the required
BareMetalHost
object for editing:kubectl -n <project-name> edit baremetalhost <host-name>
Annotate the object with the
inspect.metal3.io
annotation and ensure thatonline
equalstrue
in the objectspec
:metadata: annotations: ... inspect.metal3.io: ""
spec: ... online: true
Once you save changes, approximately in one minute, the state of the bare metal host changes to
inspecting
.Verify the state of the bare metal host:
kubectl -n <project-name> get baremetalhost <host-name>
Example of a system response:
NAME STATE CONSUMER ONLINE ERROR AGE managed-worker-c-storage-worker inspecting true 5d3h