repair script simplex_stage-1.sh for deployment

After config_controller is executed in simplex Starlingx, fail to execute
simplex_stage_1.sh in stx-tools/deployment/provision/ because that the
partition size to be created is not an integer.

Change-Id: I61947fe98950a9097632aedb9725b5ffd2685de0
Story: 2004088
Task: 28063
Signed-off-by: zhangkunpeng <zhang.kunpeng@99cloud.net>
This commit is contained in:
zhangkunpeng 2018-11-23 16:50:11 +08:00
parent dd66d0e957
commit 0c28007574
1 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@ system host-disk-list controller-0
NODE=controller-0
DEVICE=/dev/sdb
SIZE=$(system host-disk-list $NODE | grep $DEVICE | awk '{print $12}')
SIZE=$(echo $(system host-disk-list $NODE | grep $DEVICE | awk '{print $12}') | awk -F"." '{print $1}')
DISK=$(system host-disk-list $NODE | grep $DEVICE | awk '{print $2}')
# Create a partition for Cinder
system host-disk-partition-add $NODE $DISK $SIZE -t lvm_phys_vol
@ -77,7 +77,8 @@ system host-if-modify -m 1500 -n data1 -p ${PHYSNET1} -nt data ${COMPUTE} ${DATA
system host-lvg-add ${COMPUTE} nova-local
ROOT_DISK=$(system host-show ${COMPUTE} | grep rootfs | awk '{print $4}')
ROOT_DISK_UUID=$(system host-disk-list ${COMPUTE} --nowrap | grep ${ROOT_DISK} | awk '{print $2}')
PARTITION_SIZE=$(($(system host-disk-list ${COMPUTE} --nowrap | grep ${ROOT_DISK} | awk '{print $12;}')/2))
ROOT_DISK_SIZE=$(system host-disk-list ${COMPUTE} --nowrap | grep ${ROOT_DISK} | awk '{print $12}')
PARTITION_SIZE=$(echo ${ROOT_SIZE}/2|bc)
CGTS_PARTITION=$(system host-disk-partition-add -t lvm_phys_vol ${COMPUTE} ${ROOT_DISK_UUID} ${PARTITION_SIZE})
while true; do