8.2. Removing Compute Nodes

There might be situations where you need to remove Compute nodes from the Overcloud. For example, you might need to replace a problematic Compute node.

Important

Before removing a Compute node from the Overcloud, migrate the workload from the node to other Compute nodes. See Section 7.8, “Migrating VMs from an Overcloud Compute Node” for more details.
Next, disable the node's Compute service on the Overcloud. This stops the node from scheduling new instances.
$ source ~/stack/overcloudrc
$ nova service-list
$ nova service-disable [hostname] nova-compute
$ source ~/stack/stackrc
Removing Overcloud nodes requires an update to the overcloud stack in the director using the local template files. First identify the UUID of the Overcloud stack:
$ heat stack-list
Identify the UUIDs of the nodes to delete:
$ nova list
Run the following command to delete the nodes from the stack and update the plan accordingly:
$ openstack overcloud node delete --stack [STACK_UUID] --templates -e [ENVIRONMENT_FILE] [NODE1_UUID] [NODE2_UUID] [NODE3_UUID]

Important

If you passed any extra environment files when you created the Overcloud, pass them here again using the -e or --environment-file option to avoid making undesired manual changes to the Overcloud.

Important

Make sure the openstack overcloud node delete command runs to completion before you continue. Use the openstack stack list command and check the overcloud stack has reached an UPDATE_COMPLETE status.
Finally, remove the node's Compute service:
$ source ~/stack/overcloudrc
$ nova service-list
$ nova service-delete [service-id]
$ source ~/stack/stackrc
And remove the node's Open vSwitch agent:
$ source ~/stack/overcloudrc
$ neutron service-list
$ neutron service-delete [openvswitch-service-id]
$ source ~/stack/stackrc
You are now free to remove the node from the Overcloud and re-provision it for other purposes.