Update the minimum small root disk size

Dc-vault filesystem should be counted into the minimum
root disk calculation.

Partial-bug: 1916797
Depends-on: https://review.opendev.org/c/starlingx/metal/+/777464
Change-Id: I65ac2cc5bda3a94728a7f593b6aadbafca7a3af6
Signed-off-by: Angie Wang <angie.wang@windriver.com>
This commit is contained in:
Angie Wang 2021-02-23 18:18:53 -05:00
parent fca3000f72
commit fb5956ed3a
3 changed files with 28 additions and 18 deletions

View File

@ -349,14 +349,15 @@ DEFAULT_SMALL_DISK_SIZE = 240
# ETCD_STOR_SIZE 5 # ETCD_STOR_SIZE 5
# CEPH_MON_SIZE 20 # CEPH_MON_SIZE 20
# KUBELET_STOR_SIZE 10 # KUBELET_STOR_SIZE 10
# DC_VAULT_SIZE 15
# buffer inside VG for LV creation 1 # buffer inside VG for LV creation 1
# platform backup partition (created in kickstarts) 10 # platform backup partition (created in kickstarts) 10
# root partition (created in kickstarts) 20 # root partition (created in kickstarts) 20
# boot/EFI partition (created in kickstarts) 1 # boot/EFI partition (created in kickstarts) 1
# buffer for partition creation 1 # buffer for partition creation 1
# ------------------------------------------------------- # -------------------------------------------------------
# 181 # 196
MINIMUM_SMALL_DISK_SIZE = 181 MINIMUM_SMALL_DISK_SIZE = 196
# The minimum tiny disk size needed to create all partitions # The minimum tiny disk size needed to create all partitions
# Value based on the following calculation: # Value based on the following calculation:

View File

@ -7922,16 +7922,16 @@ class ConductorManager(service.PeriodicService):
# 20 G - /var/lib/ceph/mon # 20 G - /var/lib/ceph/mon
# 15 G - /opt/dc-vault (DRBD ctlr manifest for DCSC) # 15 G - /opt/dc-vault (DRBD ctlr manifest for DCSC)
# ----- # -----
# 163 G / 178 G(DCSC) # 178 G
# #
# The absolute minimum disk size for these default settings: # The absolute minimum disk size for these default settings:
# 2.0 G - buffer # 2.0 G - buffer
# 0.5 G - /boot # 0.5 G - /boot
# 10.0 G - /opt/platform-backup # 10.0 G - /opt/platform-backup
# 20.0 G - / # 20.0 G - /
# 163.0 G / 178.0 G - cgts-vg PV # 178.0 G - cgts-vg PV
# ------- # -------
# ~ 196 G / 210 G(DCSC) min size disk # ~ 210 G min size disk
# #
database_storage = constants.DEFAULT_DATABASE_STOR_SIZE database_storage = constants.DEFAULT_DATABASE_STOR_SIZE
@ -7939,7 +7939,7 @@ class ConductorManager(service.PeriodicService):
LOG.info("Disk size : %s ... small disk defaults" % disk_size) LOG.info("Disk size : %s ... small disk defaults" % disk_size)
# Small disk: under 240G and over 181G root disk # Small disk: under 240G and over 196G root disk
# #
# 8 G - /var/log (reserved in kickstart) # 8 G - /var/log (reserved in kickstart)
# 16 G - /scratch (reserved in kickstart) # 16 G - /scratch (reserved in kickstart)
@ -7966,16 +7966,16 @@ class ConductorManager(service.PeriodicService):
# 10 G - /var/lib/kubelet # 10 G - /var/lib/kubelet
# 15 G - /opt/dc-vault (DRBD ctlr manifest for DCSC) # 15 G - /opt/dc-vault (DRBD ctlr manifest for DCSC)
# ----- # -----
# 148 G / 163 G(DCSC) # 163 G
# #
# The absolute minimum disk size for these default settings: # The absolute minimum disk size for these default settings:
# 2.0 G - buffer # 2.0 G - buffer
# 0.5 G - /boot # 0.5 G - /boot
# 10.0 G - /opt/platform-backup # 10.0 G - /opt/platform-backup
# 20.0 G - / # 20.0 G - /
# 148.0 G / 163.0 G - cgts-vg PV # 163.0 G - cgts-vg PV
# ------- # -------
# ~ 181 G / 196 G(DCSC) min size disk # ~ 196 G min size disk
# #
database_storage = \ database_storage = \
constants.DEFAULT_SMALL_DATABASE_STOR_SIZE constants.DEFAULT_SMALL_DATABASE_STOR_SIZE

View File

@ -74,7 +74,8 @@ class TestAgentManager(base.TestCase):
def test_create_host_filesystems_controller_large(self): def test_create_host_filesystems_controller_large(self):
self.agent_manager._ihost_personality = constants.CONTROLLER self.agent_manager._ihost_personality = constants.CONTROLLER
self.mock_get_disk_capacity.return_value = 241 * 1024 self.mock_get_disk_capacity.return_value = \
(constants.DEFAULT_SMALL_DISK_SIZE + 1) * 1024
self.agent_manager._create_host_filesystems(self.fake_conductor_api, self.agent_manager._create_host_filesystems(self.fake_conductor_api,
self.context) self.context)
@ -95,7 +96,8 @@ class TestAgentManager(base.TestCase):
def test_create_host_filesystems_controller_small(self): def test_create_host_filesystems_controller_small(self):
self.agent_manager._ihost_personality = constants.CONTROLLER self.agent_manager._ihost_personality = constants.CONTROLLER
self.mock_get_disk_capacity.return_value = 181 * 1024 self.mock_get_disk_capacity.return_value = \
constants.MINIMUM_SMALL_DISK_SIZE * 1024
self.agent_manager._create_host_filesystems(self.fake_conductor_api, self.agent_manager._create_host_filesystems(self.fake_conductor_api,
self.context) self.context)
@ -116,7 +118,8 @@ class TestAgentManager(base.TestCase):
def test_create_host_filesystems_controller_tiny_virtual_fail(self): def test_create_host_filesystems_controller_tiny_virtual_fail(self):
self.agent_manager._ihost_personality = constants.CONTROLLER self.agent_manager._ihost_personality = constants.CONTROLLER
self.mock_get_disk_capacity.return_value = 60 * 1024 self.mock_get_disk_capacity.return_value = \
constants.MINIMUM_TINY_DISK_SIZE * 1024
self.fake_conductor_api.is_virtual_system_config_result = True self.fake_conductor_api.is_virtual_system_config_result = True
# Verify filesystems were not created # Verify filesystems were not created
@ -126,7 +129,8 @@ class TestAgentManager(base.TestCase):
def test_create_host_filesystems_controller_too_small_fail(self): def test_create_host_filesystems_controller_too_small_fail(self):
self.agent_manager._ihost_personality = constants.CONTROLLER self.agent_manager._ihost_personality = constants.CONTROLLER
self.mock_get_disk_capacity.return_value = 59 * 1024 self.mock_get_disk_capacity.return_value = \
(constants.MINIMUM_TINY_DISK_SIZE - 1) * 1024
# Verify filesystems were not created # Verify filesystems were not created
self.fake_conductor_api.create_host_filesystems.assert_not_called() self.fake_conductor_api.create_host_filesystems.assert_not_called()
@ -136,7 +140,8 @@ class TestAgentManager(base.TestCase):
tsconfig.system_type = constants.TIS_AIO_BUILD tsconfig.system_type = constants.TIS_AIO_BUILD
self.agent_manager._ihost_personality = constants.CONTROLLER self.agent_manager._ihost_personality = constants.CONTROLLER
self.mock_get_disk_capacity.return_value = 60 * 1024 self.mock_get_disk_capacity.return_value = \
constants.MINIMUM_TINY_DISK_SIZE * 1024
self.fake_conductor_api.is_virtual_system_config_result = True self.fake_conductor_api.is_virtual_system_config_result = True
self.agent_manager._create_host_filesystems(self.fake_conductor_api, self.agent_manager._create_host_filesystems(self.fake_conductor_api,
@ -158,7 +163,8 @@ class TestAgentManager(base.TestCase):
def test_create_host_filesystems_worker_large(self): def test_create_host_filesystems_worker_large(self):
self.agent_manager._ihost_personality = constants.WORKER self.agent_manager._ihost_personality = constants.WORKER
self.mock_get_disk_capacity.return_value = 241 * 1024 self.mock_get_disk_capacity.return_value = \
(constants.DEFAULT_SMALL_DISK_SIZE + 1) * 1024
self.agent_manager._create_host_filesystems(self.fake_conductor_api, self.agent_manager._create_host_filesystems(self.fake_conductor_api,
self.context) self.context)
@ -178,7 +184,8 @@ class TestAgentManager(base.TestCase):
def test_create_host_filesystems_worker_small(self): def test_create_host_filesystems_worker_small(self):
self.agent_manager._ihost_personality = constants.WORKER self.agent_manager._ihost_personality = constants.WORKER
self.mock_get_disk_capacity.return_value = 181 * 1024 self.mock_get_disk_capacity.return_value = \
constants.MINIMUM_SMALL_DISK_SIZE * 1024
self.agent_manager._create_host_filesystems(self.fake_conductor_api, self.agent_manager._create_host_filesystems(self.fake_conductor_api,
self.context) self.context)
@ -219,7 +226,8 @@ class TestAgentManager(base.TestCase):
def test_create_host_filesystems_storage_large(self): def test_create_host_filesystems_storage_large(self):
self.agent_manager._ihost_personality = constants.STORAGE self.agent_manager._ihost_personality = constants.STORAGE
self.mock_get_disk_capacity.return_value = 241 * 1024 self.mock_get_disk_capacity.return_value = \
(constants.DEFAULT_SMALL_DISK_SIZE + 1) * 1024
self.agent_manager._create_host_filesystems(self.fake_conductor_api, self.agent_manager._create_host_filesystems(self.fake_conductor_api,
self.context) self.context)
@ -239,7 +247,8 @@ class TestAgentManager(base.TestCase):
def test_create_host_filesystems_storage_small(self): def test_create_host_filesystems_storage_small(self):
self.agent_manager._ihost_personality = constants.STORAGE self.agent_manager._ihost_personality = constants.STORAGE
self.mock_get_disk_capacity.return_value = 181 * 1024 self.mock_get_disk_capacity.return_value = \
constants.MINIMUM_SMALL_DISK_SIZE * 1024
self.agent_manager._create_host_filesystems(self.fake_conductor_api, self.agent_manager._create_host_filesystems(self.fake_conductor_api,
self.context) self.context)