diff --git a/doc/source/operations/bifrost-hardware-inventory-management.rst b/doc/source/operations/bifrost-hardware-inventory-management.rst index 0a6b6c3a31..a3ea4c9594 100644 --- a/doc/source/operations/bifrost-hardware-inventory-management.rst +++ b/doc/source/operations/bifrost-hardware-inventory-management.rst @@ -105,51 +105,9 @@ To deprovision an existing hypervisor, run: Removing a Hypervisor --------------------- -To remove a hypervisor without replacing it, proceed as follows. For compute -nodes, see :doc:`deprovision-compute` for a more detailed procedure. +To remove a hypervisor without replacing it, proceed as follows. -#. :ref:`Disable the hypervisor to avoid scheduling any new instances on it ` -#. :ref:`Evacuate all instances ` -#. (optionally) Deprovision the hypervisor - - .. code-block:: console - - kayobe overcloud deprovision --limit - - .. warning:: - - Always use ``--limit`` with ``kayobe overcloud deprovision`` on a production - system. Running this command without a limit will deprovision all overcloud - hosts. - -#. Physically remove the node from the deployment - -#. Delete the node in Bifrost: - - .. code-block:: console - - docker exec -it bifrost_deploy bash - (bifrost-deploy)[root@seed bifrost-base]# export OS_CLOUD=bifrost - (bifrost-deploy)[root@seed bifrost-base]# openstack baremetal node delete - -#. Delete the compute service in OpenStack: - - .. code-block:: console - - openstack compute service list | grep - openstack compute service delete - -#. Delete the network agents in OpenStack: - - .. code-block:: console - - openstack network agent list | grep - openstack network agent delete - -#. Remove the node from the Kayobe configuration. Ensure the node is removed - from the inventory and ``network-allocation.yml``. Other configuration files - may also be removed, but this is dependent on the deployment. Recursive - ``grep`` can help here. +.. include:: deprovision-compute.rst .. _evacuating-all-instances: diff --git a/doc/source/operations/deprovision-compute.rst b/doc/source/operations/deprovision-compute.rst index 72d226860f..fca3d9ff79 100644 --- a/doc/source/operations/deprovision-compute.rst +++ b/doc/source/operations/deprovision-compute.rst @@ -1,13 +1,13 @@ -============================= +############################# Deprovisioning a Compute Node -============================= +############################# This procedure removes a compute node from service, drains it, removes all traces of it from the control plane and Kayobe configuration, and finally deprovisions the hardware in Bifrost. Check the Hypervisor -==================== +~~~~~~~~~~~~~~~~~~~~ .. code-block:: console @@ -15,7 +15,7 @@ Check the Hypervisor openstack server list --all-projects --host Put It Into Maintenance Mode -============================ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console @@ -29,7 +29,7 @@ Or use the OpenStack CLI: openstack compute service set --disable --disable-reason "decommission " nova-compute Drain the Node -============== +~~~~~~~~~~~~~~ .. code-block:: console @@ -52,7 +52,7 @@ Unpause any paused instances. openstack server migrate --wait Confirm It's Empty -================== +~~~~~~~~~~~~~~~~~~ On the to-be-decommissioned node: @@ -61,7 +61,7 @@ On the to-be-decommissioned node: docker exec nova_libvirt virsh list --all Destroy Containers and Systemd Units -==================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console @@ -69,7 +69,7 @@ Destroy Containers and Systemd Units docker stop $(docker ps -aq); docker rm $(docker ps -aq) Remove It From the Control Plane -================================ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. warning:: @@ -103,7 +103,7 @@ On a controller, check if the chassis exists and delete it: sudo docker exec ovn_sb_db ovn-sbctl --no-leader-only chassis-del Remove It From Kayobe and Monitoring -==================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Until this runs, Prometheus keeps scraping its exporters, and haproxy/fluentd keep referencing it. @@ -119,7 +119,7 @@ Remove it from ``etc/kayobe/inventory/overcloud`` and any group vars, then: kayobe overcloud service reconfigure --kolla-limit controllers,monitoring Deprovision the Hardware -======================== +~~~~~~~~~~~~~~~~~~~~~~~~ From the seed. @@ -132,7 +132,7 @@ From the seed. sudo docker exec -it bifrost_deploy bash -c 'export OS_CLOUD=bifrost; openstack baremetal node delete ' Verification -============ +~~~~~~~~~~~~ .. code-block:: console