Questo contenuto non è disponibile nella lingua selezionata.
Chapter 13. Controlling node placement
By default, director selects nodes for each role randomly, usually according to the profile tag of the node. However, you can also define specific node placement. This is useful in the following scenarios:
-
Assign specific node IDs, for example,
controller-0,controller-1 - Assign custom host names
- Assign specific IP addresses
- Assign specific Virtual IP addresses
Manually setting predictable IP addresses, virtual IP addresses, and ports for a network alleviates the need for allocation pools. However, it is recommended to retain allocation pools for each network to ease with scaling new nodes. Ensure that any statically defined IP addresses fall outside the allocation pools.
13.1. Assigning specific node IDs Copia collegamentoCollegamento copiato negli appunti!
You can assign node IDs to specific nodes, for example, controller-0, controller-1, compute-0, and compute-1.
Procedure
Assign the ID as a per-node capability that the Compute scheduler matches on deployment:
openstack baremetal node set --property capabilities='node:controller-0,boot_option:local' <id>
openstack baremetal node set --property capabilities='node:controller-0,boot_option:local' <id>Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command assigns the capability
node:controller-0to the node. Repeat this pattern using a unique continuous index, starting from 0, for all nodes. Ensure that all nodes for a given role (Controller, Compute, or each of the storage roles) are tagged in the same way, or the Compute scheduler cannot match the capabilities correctly.Create a heat environment file (for example,
scheduler_hints_env.yaml) that uses scheduler hints to match the capabilities for each node:parameter_defaults: ControllerSchedulerHints: 'capabilities:node': 'controller-%index%'parameter_defaults: ControllerSchedulerHints: 'capabilities:node': 'controller-%index%'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the following parameters to configure scheduler hints for other role types:
-
ControllerSchedulerHintsfor Controller nodes. -
ComputeSchedulerHintsfor Compute nodes. -
BlockStorageSchedulerHintsfor Block Storage nodes. -
ObjectStorageSchedulerHintsfor Object Storage nodes. -
CephStorageSchedulerHintsfor Ceph Storage nodes. -
[ROLE]SchedulerHintsfor custom roles. Replace[ROLE]with the role name.
-
-
Include the
scheduler_hints_env.yamlenvironment file in theovercloud deploy command.
Node placement takes priority over profile matching. To avoid scheduling failures, use the default baremetal flavor for deployment and not the flavors that are designed for profile matching (compute, control):. Set the respective flavor parameters to baremetal in an environment file:
parameter_defaults: OvercloudControllerFlavor: baremetal OvercloudComputeFlavor: baremetal
parameter_defaults:
OvercloudControllerFlavor: baremetal
OvercloudComputeFlavor: baremetal
13.2. Assigning custom host names Copia collegamentoCollegamento copiato negli appunti!
In combination with the node ID configuration in Section 13.1, “Assigning specific node IDs”, director can also assign a specific custom host name to each node. This is useful when you need to define where a system is located (for example, rack2-row12), match an inventory identifier, or other situations where a custom hostname is desirable.
Do not rename a node after it has been deployed. Renaming a node after deployment creates issues with instance management.
Procedure
Use the
HostnameMapparameter in an environment file, such as thescheduler_hints_env.yamlfile from Section 13.1, “Assigning specific node IDs”:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the
HostnameMapin theparameter_defaultssection, and set each mapping as the original hostname that heat defines withHostnameFormatparameters (for example,overcloud-controller-0) and the second value is the desired custom hostname for that node (overcloud-controller-prod-123-0).
Use this method in combination with the node ID placement to ensure that each node has a custom hostname.
13.3. Assigning predictable IPs Copia collegamentoCollegamento copiato negli appunti!
For further control over the resulting environment, director can assign overcloud nodes with specific IP addresses on each network.
Procedure
Create an environment file to define the predictive IP addressing:
touch ~/templates/predictive_ips.yaml
$ touch ~/templates/predictive_ips.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a
parameter_defaultssection in the~/templates/predictive_ips.yamlfile and use the following syntax to define predictive IP addressing for each node on each network:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Each node role has a unique parameter. Replace
<role_name>IPswith the relevant parameter:-
ControllerIPsfor Controller nodes. -
ComputeIPsfor Compute nodes. -
CephStorageIPsfor Ceph Storage nodes. -
BlockStorageIPsfor Block Storage nodes. -
SwiftStorageIPsfor Object Storage nodes. [ROLE]IPsfor custom roles. Replace[ROLE]with the role name.Each parameter is a map of network names to a list of addresses. Each network type must have at least as many addresses as there will be nodes on that network. Director assigns addresses in order. The first node of each type receives the first address on each respective list, the second node receives the second address on each respective lists, and so forth.
For example, use the following example syntax if you want to deploy three Ceph Storage nodes in your overcloud with predictive IP addresses:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The first Ceph Storage node receives two addresses: 172.16.1.100 and 172.16.3.100. The second receives 172.16.1.101 and 172.16.3.101, and the third receives 172.16.1.102 and 172.16.3.102. The same pattern applies to the other node types.
To configure predictable IP addresses on the control plane, copy the
/usr/share/openstack-tripleo-heat-templates/environments/ips-from-pool-ctlplane.yamlfile to thetemplatesdirectory of thestackuser:cp /usr/share/openstack-tripleo-heat-templates/environments/ips-from-pool-ctlplane.yaml ~/templates/.
$ cp /usr/share/openstack-tripleo-heat-templates/environments/ips-from-pool-ctlplane.yaml ~/templates/.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the new
ips-from-pool-ctlplane.yamlfile with the following parameter example. You can combine the control plane IP address declarations with the IP address declarations for other networks and use only one file to declare the IP addresses for all networks on all roles. You can also use predictable IP addresses for spine/leaf. Each node must have IP addresses from the correct subnet.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that the IP addresses that you choose fall outside the allocation pools for each network that you define in your network environment file. For example, ensure that the
internal_apiassignments fall outside of theInternalApiAllocationPoolsrange to avoid conflicts with any IPs chosen automatically. Also ensure that the IP assignments do not conflict with the VIP configuration, either for standard predictable VIP placement (see Section 13.4, “Assigning predictable Virtual IPs”) or external load balancing (see Section 21.4, “Configuring external load balancing”).ImportantIf an overcloud node is deleted, do not remove its entries in the IP lists. The IP list is based on the underlying heat indices, which do not change even if you delete nodes. To indicate a given entry in the list is no longer used, replace the IP value with a value such as
DELETEDorUNUSED. Entries should never be removed from the IP lists, only changed or added.
-
To apply this configuration during a deployment, include the
predictive_ips.yamlenvironment file with theopenstack overcloud deploycommand.ImportantIf you use network isolation, include the
predictive_ips.yamlfile after thenetwork-isolation.yamlfile:openstack overcloud deploy --templates \ -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \ -e ~/templates/predictive_ips.yaml \ [OTHER OPTIONS]
$ openstack overcloud deploy --templates \ -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \ -e ~/templates/predictive_ips.yaml \ [OTHER OPTIONS]Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.4. Assigning predictable Virtual IPs Copia collegamentoCollegamento copiato negli appunti!
In addition to defining predictable IP addresses for each node, you can also define predictable Virtual IPs (VIPs) for clustered services.
Procedure
Edit the network environment file and add the VIP parameters in the
parameter_defaultssection:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Select these IPs from outside of their respective allocation pool ranges. For example, select an IP address for
InternalApiVirtualFixedIPsthat is not within theInternalApiAllocationPoolsrange.
This step is only for overclouds that use the default internal load balancing configuration. If you want to assign VIPs with an external load balancer, use the procedure in the dedicated External Load Balancing for the Overcloud guide.