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:

  1. Ensure that the BareMetalHost object is not bound to any Machine object and it is in the available state.

  2. 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:

  1. Using kubeconfig of the management cluster, access the Container Cloud API and inspect the BareMetalHost 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 the available state and has no consumer (not bound to any Machine). Therefore, you can reinspect it.

  2. Open the required BareMetalHost object for editing:

    kubectl -n <project-name> edit baremetalhost <host-name>
    
  3. Annotate the object with the inspect.metal3.io annotation and ensure that online equals true in the object spec:

    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.

  4. 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