Deleting a host aggregate

When a host aggregate no longer applies in a given environment, it can be deleted. A host aggregate must have all hosts removed before it can be removed.

Getting ready

To delete a host aggregate, you will need the following information:

  • The openstack command-line client
  • The openrc file containing appropriate credentials
  • The name or ID of the aggregate

For the following example, we will delete the cookbook-threadripper-hosts aggregate.

How to do it…

The following commands are used to delete a host aggregate:

  1. First, list the existing aggregates:
    openstack aggregate list
    

    This will bring back the following output:

    How to do it…
  2. Confirm that the aggregate has no hosts (Refer to the Removing a compute host from a host aggregate recipe if necessary):
    openstack aggregate show cookbook-threadripper-hosts
    

    This will bring back the following output:

    How to do it…
  3. Now we can delete the aggregate with the following command:
    openstack aggregate delete cookbook-threadripper-hosts
    

    Tip

    This command produces no output when successful.

  4. Confirm the change with the following command:
    openstack aggregate list
    

    This will bring back the following output, where the host aggregate has now been removed:

    How to do it…

How it works…

Deleting a host aggregate removes it and all of its metadata from the Nova database, and it can no longer be used for instance scheduling.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.160.63