Delete a compute node

Since MOSK 23.2, the OpenStack-related metadata is automatically removed during the graceful machine deletion through the Mirantis Container Cloud web UI. For the procedure, refer to Mirantis Container Cloud Operations Guide: Delete a cluster machine.

During the graceful machine deletion, the OpenStack Controller performs the following operations:

  • Disables the OpenStack Compute and Block Storage services on the node to prevent further scheduling of workloads to it.

  • Verifies if any resources are present on the node, for example, instances and volumes. By default, the OpenStack Controller blocks the removal process until the resources are removed by the user. To adjust this behavior to the needs of your cluster, refer to OpenStack Controller configuration.

  • Removes OpenStack services metadata including compute services, Neutron agents, and volume services.

Caution

You cannot collocate the OpenStack compute node with other cluster components, such as Ceph. If done so, refer to the removal steps of the collocated components when planning the maintenance window.

If your cluster runs MOSK 23.1 or older version, perfrom the following steps before you remove the node from the cluster through the web UI to correctly remove the OpenStack-related metadata from it:

  1. Disable the compute service to prevent spawning of new instances. In the keystone-client pod, run:

    openstack compute service set --disable <cmp_host_name> nova-compute --disable-reason "Compute is going to be removed."
    
  2. Migrate all workloads from the node. For more information, follow Nova official documentation: Migrate instances.

  3. Ensure that there are no pods running on the node to delete by draining the node as instructed in the Kubernetes official documentation: Safely drain node.

  4. Delete the compute service using the OpenStack API. In the keystone-client pod, run:

    openstack compute service delete <service_id>
    

    Note

    To obtain <service_id>, run:

    openstack compute service list --host <cmp_host_name>
    
  5. Depending on the networking back end in use, proceed with one of the following:

    1. Obtain the network agent ID:

      openstack network agent list --host <cmp_host_name>
      
    2. Delete the Neutron Agent service running the following command in the keystone-client pod:

      openstack network agent delete <agent_id>
      
    1. Log in to the Tungsten Fabric web UI.

    2. Navigate to Configure > Infrastructure > Virtual Routers.

    3. Select the target compute node.

    4. Click Delete.