Suspending a host for maintenance
Often times a host needs to be taken offline to have memory replaced, an operating system upgraded, or other routine maintenance done. In order to ensure that running instances are not adversely affected, we use the openstack compute service set
command.
Getting ready
In order to place a host into maintenance mode, you will need the following information:
The
openstack
command-line utilityThe
nova
command-line utilityAn
openrc
file with admin credentialsThe name of the host
The host we will put into maintenance mode is as follows:
Compute host:
compute-03
How to do it…
To remove a hypervisor for maintenance, carry out the following steps:
First, we will list the available hosts:
source ~/openrc openstack compute service list -c Binary -c Host -c Status -f table
This will bring back an output like the following:
Next, we will disable the service called
nova-compute
for the compute host, so we will specify:openstack compute service set --disable compute-03 nova-compute...