[Devstack] fix waiting resources on subnode

For multinode setup we enroll IRONIC_VM_COUNT VMs on each of nodes.
As result on subnode we expecting to have 2 * IRONIC_VM_COUNT resources.

Change-Id: I5f939b0e4a8169e27c3b338ed2857efbe7263ecd
This commit is contained in:
Vasyl Saienko 2017-02-01 14:53:17 +02:00
parent 1b81e4ed02
commit d9f03f92eb

View File

@ -1565,8 +1565,8 @@ function enroll_nodes {
total_cpus=$((total_cpus+$ironic_node_cpu))
done < $ironic_hwinfo_file
if [[ "$HOST_TOPOLOGY_ROLE" != 'subnode' ]]; then
if [ "$VIRT_DRIVER" == "ironic" ]; then
if is_service_enabled nova && [[ "$VIRT_DRIVER" == "ironic" ]]; then
if [[ "$HOST_TOPOLOGY_ROLE" != 'subnode' ]]; then
local adjusted_disk
adjusted_disk=$(($ironic_node_disk - $ironic_ephemeral_disk))
# TODO(jroll) use (yet to be defined) new-style flavor here,
@ -1586,9 +1586,14 @@ function enroll_nodes {
# that was created will fail the service_check in the end of the deployment
_clean_ncpu_failure
start_nova_compute
wait_for_nova_resources "count" $total_nodes
wait_for_nova_resources "vcpus" $total_cpus
else
# NOTE(vsaienko) we enrolling IRONIC_VM_COUNT on each node. So on subnode
# we expect to have 2 x total_cpus
total_nodes=$(( total_nodes * 2 ))
total_cpus=$(( total_cpus * 2 ))
fi
wait_for_nova_resources "count" $total_nodes
wait_for_nova_resources "vcpus" $total_cpus
fi
}