Merge "Automatically create cgts-vg volume group on worker nodes"

This commit is contained in:
Zuul 2019-01-10 22:36:09 +00:00 committed by Gerrit Code Review
commit b1a7d73ee8
4 changed files with 34 additions and 19 deletions

View File

@ -164,7 +164,7 @@ write_config_file("worker",
"post_platform_conf_worker.cfg",
"post_common.cfg",
"post_kernel_aio_and_worker.cfg",
"post_lvm_no_pv_on_rootfs.cfg",
"post_lvm_pv_on_rootfs.cfg",
"post_net_common.cfg");
write_config_file("worker-lowlatency",
"${output_dir}/net_worker_lowlatency_ks.cfg", "filter_out_from_worker_lowlatency",
@ -176,7 +176,7 @@ write_config_file("worker-lowlatency",
"post_platform_conf_worker_lowlatency.cfg",
"post_common.cfg",
"post_kernel_aio_and_worker.cfg",
"post_lvm_no_pv_on_rootfs.cfg",
"post_lvm_pv_on_rootfs.cfg",
"post_net_common.cfg");
write_config_file("storage",
"${output_dir}/net_storage_ks.cfg", "filter_out_from_storage",

View File

@ -26,13 +26,15 @@
## ANCHOR = 1024
## EXTENSION = 1024
## GNOCCHI = 5120
## DOCKER = 16384 (--kubernetes)
## DOCKER = 30720 (--kubernetes)
## DOCKER_DIST = 16384 (--kubernetes)
## ETCD = 5120 (--kubernetes)
## CEPH_MON = 20480 (--kubernetes)
## RESERVED_PE = 16 (based on pesize=32768)
##
## CGCS_PV_SIZE = 10240 + 2*20480 + 20480 + 51200 + 8196 + 8196 + 2048 +
## 2048 + 1024 + 1024 + 5120 + 16384 + 16384 + 5120 + 16 = 188440
## 2048 + 1024 + 1024 + 5120 + 30720 + 16384 + 5120 +
## 20480 + 16 = 223256
##
## small install - (for disks below 240GB)
## - DB size is doubled to allow for upgrades
@ -49,14 +51,16 @@
## ANCHOR = 1024
## EXTENSION = 1024
## GNOCCHI = 5120
## DOCKER = 16384 (--kubernetes)
## DOCKER = 30720 (--kubernetes)
## DOCKER_DIST = 16384 (--kubernetes)
## ETCD = 5120 (--kubernetes)
## CEPH_MON = 20480 (--kubernetes)
## RESERVED_PE = 16 (based on pesize=32768)
##
##
## CGCS_PV_SIZE = 10240 + 2*10240 + 10240 + 40960 + 8192 + 8192 + 2048 +
## 2048 +1024 + 1024 + 5120 + 16384 + 16384 + 5120 + 16 = 147472
## 2048 + 1024 + 1024 + 5120 + 30720 + 16384 + 5120 +
## 20480 + 16 = 182288
##
## NOTE: To maintain upgrade compatability within the volume group, keep the
## undersized LOG_VOL_SIZE and SCRATCH_VOL_SIZE, but size the minimally size
@ -82,14 +86,13 @@
sz=$(blockdev --getsize64 $(get_disk $rootfs_device))
if [ $sz -le $((240*$gb)) ] ; then
# Round CGCS_PV_SIZE to the closest upper value that can be divided by 1024.
# 147472/1024= 144.02. CGCS_PV_SIZE=145*1024=148480. Using a disk with a
# size under 145GB will fail. 120GB disks will no longer install for AIO
# installations.
CGCS_PV_SIZE=148480
# 182288/1024=178.02. CGCS_PV_SIZE=179*1024=183296. Using a disk with a
# size under 179GiB will fail.
CGCS_PV_SIZE=183296
else
# Round CGCS_PV_SIZE to the closest upper value that can be divided by 1024.
# 188440/1024= 184.02. CGCS_PV_SIZE=185*1024=189440.
CGCS_PV_SIZE=189440
# 223256/1024=218.02. CGCS_PV_SIZE=219*1024=224256.
CGCS_PV_SIZE=224256
fi
ROOTFS_SIZE=20000

View File

@ -1,6 +1,6 @@
sz=$(blockdev --getsize64 $(get_disk $rootfs_device))
if [ $sz -le $((60*$gb)) ] ; then
if [ $sz -le $((90*$gb)) ] ; then
LOG_VOL_SIZE=4000
SCRATCH_VOL_SIZE=4000
ROOTFS_SIZE=10000

View File

@ -1,14 +1,24 @@
LOG_VOL_SIZE=4000
SCRATCH_VOL_SIZE=4000
## LOG_VOL_SIZE = 4096
## SCRATCH_VOL_SIZE = 4096
## DOCKER = 30720 (--kubernetes)
## CEPH_MON = 20480 (--kubernetes)
## RESERVED_PE = 16 (based on pesize=32768)
##
## CGTS_PV_SIZE = 4096 + 4096 + 30720 + 20480 + 16 = 59408
##
## Round CGTS_PV_SIZE to the closest upper value that can be divided by 1024.
## 59408/1024=58.01. CGTS_PV_SIZE=59*1024=60416.
CGTS_PV_SIZE=60416
sz=$(blockdev --getsize64 $(get_disk $rootfs_device))
if [ $sz -le $((80*$gb)) ] ; then
## Less than 80GB use a 10GB root partition
LOG_VOL_SIZE=4000
SCRATCH_VOL_SIZE=4000
ROOTFS_SIZE=10000
else
## Use a 20GB root partition
LOG_VOL_SIZE=4000
SCRATCH_VOL_SIZE=4000
ROOTFS_SIZE=20000
fi
@ -21,9 +31,11 @@ fi
cat<<EOF>>/tmp/part-include
part /boot --fstype=ext4 --asprimary --size=500 --ondrive=$(get_disk $rootfs_device) --fsoptions="$ROOTFS_OPTIONS"
part pv.253004 --asprimary --size=$CGTS_PV_SIZE --ondrive=$(get_disk $rootfs_device)
volgroup cgts-vg --pesize=32768 pv.253004
logvol /var/log --fstype=ext4 --vgname=cgts-vg --size=$LOG_VOL_SIZE --name=log-lv
logvol /scratch --fstype=ext4 --vgname=cgts-vg --size=$SCRATCH_VOL_SIZE --name=scratch-lv
part / --fstype=ext4 --asprimary --size=$ROOTFS_SIZE --ondrive=$(get_disk $rootfs_device) --fsoptions="$ROOTFS_OPTIONS"
part /var/log --fstype=ext4 --size=$LOG_VOL_SIZE --ondrive=$(get_disk $rootfs_device)
part /scratch --fstype=ext4 --size=$SCRATCH_VOL_SIZE --ondrive=$(get_disk $rootfs_device)
EOF