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
openstackcommand-line clientThe
openrcfile containing appropriate credentialsThe 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:
First, list the existing aggregates:
openstack aggregate listThis will bring back the following output:

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-hostsThis will bring back the following output:

Now we can delete the aggregate with the following command:
openstack aggregate delete cookbook-threadripper-hostsNote
This command produces no output...