Adding a compute host to a host aggregate

Before a host aggregate can be used by OpenStack Compute, you must first add hosts to the aggregate groups created.

Getting ready

To add a host to an 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
  • The name or ID of the host

For the following example, the required values are as follows:

  • Host aggregate: cookbook-ssd-hosts
  • Compute host: compute-01

How to do it…

The following process is used to add a host to a host aggregate:

  1. List hosts that are already in the aggregate:
    openstack aggregate show cookbook-ssd-hosts
    

    This will bring back an output like the following:

    How to do it…
  2. Now add the specified compute host to this aggregate as follows:
    openstack aggregate add host cookbook-ssd-hosts compute-01
    

    This will bring back an output like the following:

    How to do it…

How it works…

The openstack aggregate host add command associates a host with a host aggregate in the Nova database. This information is then used by the Nova Scheduler to make decisions about where to place an instance. If the metadata of the host aggregate matches that of the flavor or a particular project a user is in, an instance can be scheduled to a host within the aggregate.

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

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