Restart the inspection of a bare-metal host¶
You can use the MOSK management 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
BareMetalHostInventoryobject is not bound to anyMachineobject and it is in theavailablestate.Edit the
BareMetalHostInventoryobject to initiate an inspection of the bare-metal server that hosts the node.
To restart the inspection of a bare-metal host:
Using
kubeconfigof the management cluster, access the MOSK management API and inspect theBareMetalHostobject:kubectl -n <project-name> get baremetalhost <bare-metal-host-name>
Example of the system response:
NAME STATE CONSUMER ONLINE ERROR AGE ... mosk-worker-a-storage-worker preparing mosk-worker-a-storage-worker false 5d3h mosk-worker-b-storage-worker preparing mosk-worker-b-storage-worker false 5d3h mosk-worker-c-storage-worker available false 5d3h
In the system response above, the
mosk-worker-c-storage-workerbare metal host is in theavailablestate and has noconsumer(not bound to anyMachine). Therefore, you can reinspect it.Open the required bare-metal host object for editing:
kubectl -n <project-name> edit baremetalhostinventory <host-name>
Annotate the object with the
inspect.metal3.ioannotation and ensure thatonlineequalstruein 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 mosk-worker-c-storage-worker inspecting true 5d3h