summaryrefslogtreecommitdiffstats
path: root/lib/virtual-setup-functions.sh
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-08-23 02:37:42 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-23 02:37:42 +0000
commitea1ad48ca5f4ec391b4232fa92ba027119ad2ca7 (patch)
tree9cbf6fd0fc86fce734d4f0ce35610d22ceafc082 /lib/virtual-setup-functions.sh
parent5805f11fb10b474b9e6bf8bf31f2bea2806174a2 (diff)
parent9c776d55e9f69de416823acff52017e9ea6ca5a8 (diff)
Merge "correcting the virtual baremetal defaults"
Diffstat (limited to 'lib/virtual-setup-functions.sh')
-rwxr-xr-xlib/virtual-setup-functions.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/virtual-setup-functions.sh b/lib/virtual-setup-functions.sh
index abff25e4..903e3bcd 100755
--- a/lib/virtual-setup-functions.sh
+++ b/lib/virtual-setup-functions.sh
@@ -30,19 +30,19 @@ EOF
# next create the virtual machines and add their definitions to the file
if [ "$ha_enabled" == "False" ]; then
- # 1 controller + computes
- # zero based so just pass compute count
- vm_index=$VM_COMPUTES
+ controller_index=0
else
+ controller_index=2
# 3 controller + computes
# zero based so add 2 to compute count
- vm_index=$((2+$VM_COMPUTES))
+ if [ $VM_COMPUTES -lt 2 ]; then
+ VM_COMPUTES=2
+ fi
fi
- for i in $(seq 0 $vm_index); do
- if [ "$VM_COMPUTES" -gt 0 ]; then
+ for i in $(seq 0 $(($controller_index+$VM_COMPUTES))); do
+ if [ $i -gt $controller_index ]; then
capability="profile:compute"
- VM_COMPUTES=$((VM_COMPUTES - 1))
else
capability="profile:control"
if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "$ramsize" -lt 10240 ]]; then