Delete a compute node

This section describes how to delete an OpenStack compute node from your MOS deployment.

To delete a compute node:

Caution

The OpenStack compute node can be collocated with other components, for example, Ceph. Refer to the removal steps of collocated components when planning maintenance.

  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 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. Delete the Neutron agent service. In the keystone-client pod, run:

    openstack network agent delete <agent_id>
    

    Note

    To obtain <agent_id>, run:

    openstack network agent list --host <cmp_host_name>
    
  6. Delete the node through the Mirantis Container Cloud web UI as described in Mirantis Container Cloud Operations Guide: Delete a machine.