Update minimal PV size to include k8s LVs

Make sure the minimally sized physical volume for the cgts-vg volume
group is sized correctly when the --kubernetes option is used with
config_controller. Include the kubernetes specific logical volumes that
will be present in a kubernetes configuration.

Change-Id: Ifc6d2c0a5dbb880f8e1ff73b01bc05cb8ab22855
Partial-Bug: #1794567
Signed-off-by: Robert Church <robert.church@windriver.com>
This commit is contained in:
Robert Church 2018-09-18 15:17:40 -04:00
parent 0d5aeffc35
commit ded5907f5b
1 changed files with 19 additions and 13 deletions

View File

@ -1,6 +1,7 @@
## NOTE: updates to partition sizes need to be also reflected in
## _controller_filesystem_limits() in sysinv/api/controllers/v1/istorconfig.py
## - stx-config/.../sysinv/conductor/manager.py:create_controller_filesystems()
## - stx-config/.../sysinv/common/constants.py
##
## NOTE: When adding partitions, we currently have a max of 4 primary partitions.
## If more than 4 partitions are required, we can use a max of 3 --asprimary,
@ -25,10 +26,13 @@
## ANCHOR = 1024
## EXTENSION = 1024
## GNOCCHI = 5120
## DOCKER = 10240 (--kubernetes)
## DOCKER_DIST = 1024 (--kubernetes)
## ETCD = 5120 (--kubernetes)
## RESERVED_PE = 16 (based on pesize=32768)
##
## CGCS_PV_SIZE = 10240 + 2*20480 + 20480 + 51200 + 8196 +
## 8196 + 2048 + 2048 + 1024 + 1024 + 5120 + 16 = 150544
## CGCS_PV_SIZE = 10240 + 2*20480 + 20480 + 51200 + 8196 + 8196 + 2048 +
## 2048 + 1024 + 1024 + 5120 + 10240 + 1024 + 5120 + 16 = 166936
##
## small install - (for disks below 240GB)
## - DB size is doubled to allow for upgrades
@ -45,10 +49,14 @@
## ANCHOR = 1024
## EXTENSION = 1024
## GNOCCHI = 5120
## DOCKER = 10240 (--kubernetes)
## DOCKER_DIST = 1024 (--kubernetes)
## ETCD = 5120 (--kubernetes)
## RESERVED_PE = 16 (based on pesize=32768)
##
## CGCS_PV_SIZE = 10240 + 2*10240 + 10240 + 40960 + 8192 +
## 8192 + 2048 + 2048 + 1024 + 1024 + 5120 +16 = 109584
##
## CGCS_PV_SIZE = 10240 + 2*10240 + 10240 + 40960 + 8192 + 8192 + 2048 +
## 2048 +1024 + 1024 + 5120 + 10240 + 1024 + 5120 + 16 = 125968
##
## NOTE: To maintain upgrade compatability within the volume group, keep the
## undersized LOG_VOL_SIZE and SCRATCH_VOL_SIZE, but size the minimally size
@ -73,15 +81,13 @@
sz=$(blockdev --getsize64 $(get_disk $rootfs_device))
if [ $sz -le $((240*$gb)) ] ; then
# Round CGCS_PV_SIZE to the closest upper valued
# that can be divided by 1024. 109584/1024= 107.01 so
# CGCS_PV_SIZE=108*1024=110592
# Using a disk with a size under 130GB as install
# disk will allow the system to install, but
# config_controller will fail
CGCS_PV_SIZE=110592
# Round CGCS_PV_SIZE to the closest upper value that can be divided by 1024.
# 125968/1024= 123.02. CGCS_PV_SIZE=124*1024=126976. Using a disk with a
# size under 127GB will fail. 120GB disks will no longer install for AIO
# installations.
CGCS_PV_SIZE=126976
else
CGCS_PV_SIZE=150544
CGCS_PV_SIZE=166936
fi
ROOTFS_SIZE=20000