Files
openstack-ansible/doc/source/admin/scale-environment/shutting-down-compute-host.rst
Ivan Anfimov 107b2025fe docs: update structure for scaling your environment
It seems to me that there is too much information on one page, I have divided it into several pages for easier reading, as was already done on the pages:
https://docs.openstack.org/openstack-ansible/latest/admin/openstack-firstrun.html
https://docs.openstack.org/openstack-ansible/latest/admin/openstack-firstrun.html
https://docs.openstack.org/openstack-ansible/latest/admin/maintenance-tasks.html

Change-Id: Ic58e0c764f21c377b72e7229d1c053864b601785
2025-05-23 17:23:34 +00:00

1.1 KiB

Shutting down the Compute host

If a Compute host needs to be shut down:

  1. Disable the nova-compute binary:

    # nova service-disable --reason "Hardware replacement" HOSTNAME nova-compute
  2. List all running instances on the Compute host:

    # nova list --all-t --host <compute_name> | awk '/ACTIVE/ {print $2}' > \
    /home/user/running_instances && for i in `cat /home/user/running_instances`; do nova stop $i ; done
  3. Use SSH to connect to the Compute host.

  4. Confirm all instances are down:

    # virsh list --all
  5. Shut down the Compute host:

    # shutdown -h now
  6. Once the Compute host comes back online, confirm everything is in working order and start the instances on the host. For example:

    # cat /home/user/running_instances
    # do nova start $instance
      done
  7. Enable the nova-compute service in the environment:

    # nova service-enable HOSTNAME nova-compute