From 0c280075749b9a19a8d235b184fa2926d06a54f3 Mon Sep 17 00:00:00 2001 From: zhangkunpeng Date: Fri, 23 Nov 2018 16:50:11 +0800 Subject: [PATCH] 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 --- deployment/provision/simplex_stage_1.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deployment/provision/simplex_stage_1.sh b/deployment/provision/simplex_stage_1.sh index b25f065b..b0c71faf 100755 --- a/deployment/provision/simplex_stage_1.sh +++ b/deployment/provision/simplex_stage_1.sh @@ -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