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 BareMetalHostInventory object is not bound to any Machine object and it is in the available state.

  2. Edit the BareMetalHostInventory object to initiate an inspection of the bare metal server that hosts the node.

Note

Before update of the management cluster to Container Cloud 2.29.0 (Cluster release 16.4.0), instead of BareMetalHostInventory, use the BareMetalHost object. For details, see BareMetalHost resource.

Caution

While the Cluster release of the management cluster is 16.4.0, BareMetalHostInventory operations are allowed to m:kaas@management-admin only. This limitation is lifted once the management cluster is updated to the Cluster release 16.4.1 or later.

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 bare metal host object for editing:

    kubectl -n <project-name> edit baremetalhostinventory <host-name>
    
    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