Removing an Availability Zone

Removing an AZ is a multistep process, and has some caveats. To remove an AZ, you must first remove the hosts from the host aggregate.

Getting ready

The following information is required to remove an AZ:

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

How to do it…

The following steps can be used to remove an AZ:

  1. First, list the AZs available with the following command:
    openstack availability zone list
    

    This will bring back an output like the following:

    How to do it…
  2. Now list the hosts within the AZ that we want to delete:
    openstack aggregate show cookbook-az
    

    This will bring back an output like the following:

    How to do it…
  3. Now remove the hosts with following command (repeat as necessary for each host in the aggregate):
    openstack aggregate remove host cookbook-az compute-01
    

    This will bring back the following output:

    How to do it…
  4. Remove the AZ using the aggregate delete command:
    openstack aggregate delete cookbook-az
    

    Tip

    This command produces no output if successful.

  5. Confirm the removal of the AZ with the following command:
    openstack availability zone list
    

    This will bring back an output like the following, showing that our AZ has been removed:

    How to do it…

How it works…

In order to remove an AZ, it must first have no active hosts. Because AZs are a special case of host aggregates, the commands for identifying and removing hosts from an AZ are the same. Once you have removed the hosts, the openstack aggregate delete [name] command is used to complete the removal of the AZ.

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

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