A.3. Manage Compute Expansion

A.3.1. Adding Compute Resources

Adding Compute resources is the most common way to expand the OpenStack environment. This is done by adding additional nodes that host, at a minimum, an instance of the Compute (openstack-nova-compute) service. Once the Compute service is configured and running it communicates with other nodes in the environment (including Compute API endpoints and Compute conductors) through the message broker.
To add additional compute nodes repeat the steps performed when installing the original compute node:
If you wish to run an instance of the Compute conductor service (openstack-nova-conductor) then you must also ensure that the service is configured to access the compute database, refer to Section 8.4.5.2, “Configure the Compute Service Database Connection” for more information.
Once the additional instance of the Compute service has been started the node will begin accepting requests to launch virtual machine instances. Use the nova service-list while authenticated as the OpenStack administrator (using a keystonerc file) to confirm the status of the new node.

A.3.2. Safely Remove Compute Resources

Removal of a compute node must be done carefully to prevent negative consequences for virtual machine instances running on that node. There must be capacity available on other compute nodes within the environment to run these virtual machine instances while the node being removed is out of service.
The steps listed in this procedure must be executed by a user who has access to the credentials of an OpenStack administrative user and a system with the Nova command line client (python-novaclient) installed.

Procedure A.4. Safely removing Compute resources

  1. Use the source command to load the administrative credentials from the keystonerc_admin file.
    $ source ~/keystonerc_admin
  2. Use the nova service-list command to identify the compute node to be removed.
    $ nova service-list
    +------------------+----------+----------+---------+-------+
    | Binary           | Host     | Zone     | Status  | State |
    +------------------+----------+----------+---------+-------+
    | nova-cert        | node0001 | internal | enabled | up    |
    | nova-compute     | node0001 | nova     | enabled | up    |
    | nova-conductor   | node0001 | internal | enabled | up    |
    | nova-consoleauth | node0001 | internal | enabled | up    |
    | nova-network     | node0001 | internal | enabled | up    |
    | nova-scheduler   | node0001 | internal | enabled | up    |
    | ...              | ...      | ...      | ...     | ...   |
    +------------------+----------+----------+---------+-------+
  3. Use the nova service-disable command to disable the nova-compute service on the node. This prevents new instances from being scheduled to run on the host.
    $ nova service-disable HOST nova-compute
    +----------+--------------+----------+
    | Host     | Binary       | Status   |
    +----------+--------------+----------+
    | node0001 | nova-compute | disabled |
    +----------+--------------+----------+
    Replace HOST with the name of the node to disable as indicated in the output of the nova service-list command in the previous step.
  4. Use the nova service-list command to verify that the relevant instance of the nova-compute service is now disabled.
    $ nova service-list
    +------------------+----------+----------+----------+-------+
    | Binary           | Host     | Zone     | Status   | State |
    +------------------+----------+----------+----------+-------+
    | nova-cert        | node0001 | internal | enabled  | up    |
    | nova-compute     | node0001 | nova     | disabled | up    |
    | nova-conductor   | node0001 | internal | enabled  | up    |
    | nova-consoleauth | node0001 | internal | enabled  | up    |
    | nova-network     | node0001 | internal | enabled  | up    |
    | nova-scheduler   | node0001 | internal | enabled  | up    |
    | ...              | ...      | ...      | ...      | ...   |
    +------------------+----------+----------+----------+-------+
  5. Use the nova migrate command to migrate running instances to other compute nodes.
    $ nova migrate HOST
    Replace HOST with the name of the host being removed as indicated by the nova service-list command in the previous steps.
Once the migration of virtual machine instances has been completed the node can safely be shutdown or otherwise operated on without negatively impacting running virtual machine instances.

Note

For further information on migration, refer to the Red Hat Enterprise Linux OpenStack Platform Configuration Reference Guide from the following link: