summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-08-18 13:13:54 -0400
committerDan Radez <dradez@redhat.com>2016-08-22 13:26:29 -0400
commit9c776d55e9f69de416823acff52017e9ea6ca5a8 (patch)
treedfb60c97d7e37a1b59edf2a5edc9d0208af80024 /lib
parent768da1ab4788130d62848b2db172503fa5b37e02 (diff)
correcting the virtual baremetal defaults
Defaults for virtual deployments was not correct, there were three baremetal nodes being created by default for a noha deployment. JIRA: APEX-221 Change-Id: I8b13ffb620d8ebaed4308725edbc7e84279872dd Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/overcloud-deploy-functions.sh2
-rwxr-xr-xlib/virtual-setup-functions.sh14
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index df17750b..ab8086b5 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -180,7 +180,7 @@ EOI
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml"
# scale compute nodes according to inventory
- total_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "cat /home/stack/instackenv.json | grep -c memory")
+ total_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "grep -c memory /home/stack/instackenv.json")
# check if HA is enabled
if [[ "$ha_enabled" == "True" ]]; then
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