Chapter 15. Scaling overcloud nodes Warning Do not use openstack server delete to remove nodes from the overcloud. Follow the procedures in this section to remove and replace nodes correctly. If you want to add or remove nodes after the creation of the overcloud, you must update the overcloud. Use the following table to determine support for scaling each node type: Table 15.1. Scale support for each node type Node type Scale up? Scale down? Notes Controller N N You can replace Controller nodes using the procedures in Chapter 16, Replacing Controller nodes . Compute Y Y Ceph Storage nodes Y N You must have at least 1 Ceph Storage node from the initial overcloud creation. Object Storage nodes Y Y Important Ensure that you have at least 10 GB free space before you scale the overcloud. This free space accommodates image conversion and caching during the node provisioning process. 15.1. Adding nodes to the overcloud Complete the following steps to add more nodes to the director node pool. Procedure Create a new JSON file ( newnodes.json ) that contains details of the new node that you want to register: Run the following command to register the new nodes: After you register the new nodes, run the following commands to launch the introspection process for each new node: This process detects and benchmarks the hardware properties of the nodes. Configure the image properties for the node: 15.2. Increasing node counts for roles Complete the following steps to scale overcloud nodes for a specific role, such as a Compute node. Procedure Tag each new node with the role you want. For example, to tag a node with the Compute role, run the following command: To scale the overcloud, you must edit the environment file that contains your node counts and re-deploy the overcloud. For example, to scale your overcloud to 5 Compute nodes, edit the ComputeCount parameter: Rerun the deployment command with the updated file, which in this example is called node-info.yaml : Ensure that you include all environment files and options from your initial overcloud creation. This includes the same scale parameters for non-Compute nodes. Wait until the deployment operation completes. 15.3. Removing Compute nodes There might be situations where you need to remove Compute nodes from the overcloud. For example, you might need to replace a problematic Compute node. Important Before you remove a Compute node from the overcloud, migrate the workload from the node to other Compute nodes. For more information, see Migrating virtual machine instances between Compute nodes . Prerequisites The Placement service package python3-osc-placement installed on the undercloud. Procedure Source the overcloud configuration: Disable the Compute service on the outgoing node on the overcloud to prevent the node from scheduling new instances: Tip Use the --disable-reason option to add a short explanation on why the service is being disabled. This is useful if you intend to redeploy the Compute service at a later point. Source the undercloud configuration: Identify the UUID of the overcloud stack: Identify the UUIDs or hostnames of the nodes that you want to delete: Redeploy the overcloud with the --update-plan-only option, including all of the environment files that are relevant to your deployment: Delete the nodes from the stack: Replace [node] with a UUID or hostname of a node. Important Do not use a mix of UUIDs and hostnames. Use either only UUIDs or only hostnames. Ensure that the openstack overcloud node delete command runs to completion: The status of the overcloud stack shows UPDATE_COMPLETE when the delete operation is complete. Important If you intend to redeploy the Compute service with the same host name, you must use the existing service records for the redeployed node. If this is the case, skip the remaining steps in this procedure, and proceed with the instructions detailed in Redeploying the Compute service using the same host name . Remove the Compute service from the node: Remove the Open vSwitch agent from the node: Remove the deleted Compute service as a resource provider from the Placement service: Decrease the ComputeCount parameter in the environment file that contains your node counts. This file is usually named node-info.yaml . For example, decrease the node count from five nodes to three nodes if you removed two nodes: Decreasing the node count ensures director does not provision any new nodes when you run openstack overcloud deploy . You can remove the node from the overcloud and re-provision it for other purposes. Redeploying the Compute service using the same host name To redeploy a disabled Compute service, re-enable it after you redeploy a Compute node with the same host name. Procedure Remove the deleted Compute service as a resource provider from the Placement service: Check the status of the Compute service: When the service state of the redeployed Compute node changes to up , re-enable the service: 15.4. Replacing Ceph Storage nodes You can use director to replace Ceph Storage nodes in a director-created cluster. For more information, see the Deploying an Overcloud with Containerized Red Hat Ceph guide. 15.5. Replacing Object Storage nodes Follow the instructions in this section to understand how to replace Object Storage nodes without impact to the integrity of the cluster. This example involves a three-node Object Storage cluster in which you want to replace the node overcloud-objectstorage-1 node. The goal of the procedure is to add one more node and then remove the overcloud-objectstorage-1 node. The new node replaces the overcloud-objectstorage-1 node. Procedure Increase the Object Storage count using the ObjectStorageCount parameter. This parameter is usually located in node-info.yaml , which is the environment file that contains your node counts: The ObjectStorageCount parameter defines the quantity of Object Storage nodes in your environment. In this example, scale the quantity of Object Storage nodes from 3 to 4 . Run the deployment command with the updated ObjectStorageCount parameter: After the deployment command completes, the overcloud contains an additional Object Storage node. Replicate data to the new node. Before you remove a node, in this case, overcloud-objectstorage-1 , wait for a replication pass to finish on the new node. Check the replication pass progress in the /var/log/swift/swift.log file. When the pass finishes, the Object Storage service should log entries similar to the following example: To remove the old node from the ring, reduce the ObjectStorageCount parameter to omit the old node. In this example, reduce the ObjectStorageCount parameter to 3 : Create a new environment file named remove-object-node.yaml . This file identifies and removes the specified Object Storage node. The following content specifies the removal of overcloud-objectstorage-1 : Include both the node-info.yaml and remove-object-node.yaml files in the deployment command: Director deletes the Object Storage node from the overcloud and updates the rest of the nodes on the overcloud to accommodate the node removal. Important Include all environment files and options from your initial overcloud creation. This includes the same scale parameters for non-Compute nodes. 15.6. Blacklisting nodes You can exclude overcloud nodes from receiving an updated deployment. This is useful in scenarios where you want to scale new nodes and exclude existing nodes from receiving an updated set of parameters and resources from the core heat template collection. This means that the blacklisted nodes are isolated from the effects of the stack operation. Use the DeploymentServerBlacklist parameter in an environment file to create a blacklist. Setting the blacklist The DeploymentServerBlacklist parameter is a list of server names. Write a new environment file, or add the parameter value to an existing custom environment file and pass the file to the deployment command: Note The server names in the parameter value are the names according to OpenStack Orchestration (heat), not the actual server hostnames. Include this environment file with your openstack overcloud deploy command: Heat blacklists any servers in the list from receiving updated heat deployments. After the stack operation completes, any blacklisted servers remain unchanged. You can also power off or stop the os-collect-config agents during the operation. Warning Exercise caution when you blacklist nodes. Only use a blacklist if you fully understand how to apply the requested change with a blacklist in effect. It is possible to create a hung stack or configure the overcloud incorrectly when you use the blacklist feature. For example, if cluster configuration changes apply to all members of a Pacemaker cluster, blacklisting a Pacemaker cluster member during this change can cause the cluster to fail. When you add servers to the blacklist, further changes to those nodes are not supported until you remove the server from the blacklist. This includes updates, upgrades, scale up, scale down, and node replacement. For example, when you blacklist existing Compute nodes while scaling out the overcloud with new Compute nodes, the blacklisted nodes miss the information added to /etc/hosts and /etc/ssh/ssh_known_hosts . This can cause live migration to fail, depending on the destination host. The Compute nodes are updated with the information added to /etc/hosts and /etc/ssh/ssh_known_hosts during the overcloud deployment where they are no longer blacklisted. Clearing the blacklist To clear the blacklist for subsequent stack operations, edit the DeploymentServerBlacklist to use an empty array: Warning Do not omit the DeploymentServerBlacklist parameter. If you omit the parameter, the overcloud deployment uses the previously saved value.

Commands:
{ "nodes":[ { "mac":[ "dd:dd:dd:dd:dd:dd" ], "cpu":"4", "memory":"6144", "disk":"40", "arch":"x86_64", "pm_type":"ipmi", "pm_user":"admin", "pm_password":"p@55w0rd!", "pm_addr":"192.168.24.207" }, { "mac":[ "ee:ee:ee:ee:ee:ee" ], "cpu":"4", "memory":"6144", "disk":"40", "arch":"x86_64", "pm_type":"ipmi", "pm_user":"admin", "pm_password":"p@55w0rd!", "pm_addr":"192.168.24.208" } ] }
source ~/stackrc (undercloud) USD openstack overcloud node import newnodes.json
(undercloud) USD openstack baremetal node manage [NODE UUID] (undercloud) USD openstack overcloud node introspect [NODE UUID] --provide
(undercloud) USD openstack overcloud node configure [NODE UUID]
(undercloud) USD openstack baremetal node set --property capabilities='profile:compute,boot_option:local' [NODE UUID]
parameter_defaults: ComputeCount: 5
(undercloud) USD openstack overcloud deploy --templates -e /home/stack/templates/node-info.yaml [OTHER_OPTIONS]
source ~/overcloudrc
(overcloud) USD openstack compute service list (overcloud) USD openstack compute service set <hostname> nova-compute --disable
(overcloud) USD source ~/stackrc
(undercloud) USD openstack stack list
(undercloud) USD openstack server list
openstack overcloud deploy --update-plan-only --templates -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e /home/stack/templates/network-environment.yaml -e /home/stack/templates/storage-environment.yaml -e /home/stack/templates/rhel-registration/environment-rhel-registration.yaml [-e |...]
openstack overcloud node delete --stack [STACK_UUID] --templates -e [ENVIRONMENT_FILE] [NODE1_UUID] [NODE2_UUID] [NODE3_UUID]
(undercloud) USD openstack stack list
(undercloud) USD source ~/overcloudrc (overcloud) USD openstack compute service list (overcloud) USD openstack compute service delete <service-id>
(overcloud) USD openstack network agent list (overcloud) USD openstack network agent delete <openvswitch-agent-id>
(overcloud) USD openstack resource provider list (overcloud) USD openstack resource provider delete <uuid>
parameter_defaults: ComputeCount: 3
(undercloud) USD source ~/overcloudrc (overcloud) USD openstack resource provider list (overcloud) USD openstack resource provider delete <uuid>
(overcloud) USD openstack compute service list --long | ID | Binary | Host | Zone | Status | State | Updated At | Disabled Reason | | 80 | nova-compute | compute-1.localdomain | nova | disabled | up | 2018-07-13T14:35:04.000000 | gets re-provisioned |
(overcloud) USD openstack compute service set compute-1.localdomain nova-compute --enable
parameter_defaults: ObjectStorageCount: 4
source ~/stackrc (undercloud) USD openstack overcloud deploy --templates -e node-info.yaml ENVIRONMENT_FILES
Mar 29 08:49:05 localhost object-server: Object replication complete. Mar 29 08:49:11 localhost container-server: Replication run OVER Mar 29 08:49:13 localhost account-server: Replication run OVER
parameter_defaults: ObjectStorageCount: 3
parameter_defaults: ObjectStorageRemovalPolicies: [{'resource_list': ['1']}]
(undercloud) USD openstack overcloud deploy --templates -e node-info.yaml ENVIRONMENT_FILES -e remove-object-node.yaml
parameter_defaults: DeploymentServerBlacklist: - overcloud-compute-0 - overcloud-compute-1 - overcloud-compute-2
source ~/stackrc (undercloud) USD openstack overcloud deploy --templates -e server-blacklist.yaml [OTHER OPTIONS]
parameter_defaults: DeploymentServerBlacklist: []