Lock a Host Using the CLI¶
Locking an unlocked host takes it out of service for configuration and maintenance purposes.
About this task
On a controller node, the state transition only succeeds if there are no services running in active mode on the host.
On a worker node (or AIO), the state transition only succeeds if all
currently running containers (hosted applications) on the host can be
re-located on alternative worker nodes or AIO Controller. Re-location of
containers is initiated automatically by StarlingX as soon as the state transition
is requested. For containers, a live re-location of the container to
another host is attempted. A
NoExecute taint, as shown below, is applied to
the host, causing any containers on that host to be evicted.
On a StarlingX Simplex system, where re-location of containers is not possible, all running containers are stopped when a host is locked. Other services continue to run.
You can lock a host from the controller’s command line as follows:
~(keystone_admin)$ system host-lock <hostname>