From 225f3004b7d85eb7b5dc86e90484d1183566f3af Mon Sep 17 00:00:00 2001 From: vavuthu Date: Fri, 8 Nov 2024 14:38:41 +0530 Subject: [PATCH] set IBM cloud managed OSD size to minimum requirement Signed-off-by: vavuthu --- ocs_ci/deployment/deployment.py | 10 +++++++++- ocs_ci/ocs/defaults.py | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ocs_ci/deployment/deployment.py b/ocs_ci/deployment/deployment.py index eb4ec4479cb..a8e227cb0e0 100644 --- a/ocs_ci/deployment/deployment.py +++ b/ocs_ci/deployment/deployment.py @@ -1756,7 +1756,15 @@ def deploy_odf_addon(self): ocs_version = version.get_semantic_ocs_version_from_config() disable_noobaa = config.COMPONENTS.get("disable_noobaa", False) noobaa_cmd_arg = f"--param ignoreNoobaa={str(disable_noobaa).lower()}" - device_size = int(config.ENV_DATA.get("device_size", defaults.DEVICE_SIZE)) + device_size = int( + config.ENV_DATA.get("device_size", defaults.DEVICE_SIZE_IBM_CLOUD_MANAGED) + ) + if device_size < defaults.DEVICE_SIZE_IBM_CLOUD_MANAGED: + logger.warning( + f"OSD size provided is less than the minimum required 512Gi." + f" Setting OSD device size to {defaults.DEVICE_SIZE_IBM_CLOUD_MANAGED}" + ) + device_size = defaults.DEVICE_SIZE_IBM_CLOUD_MANAGED osd_size_arg = f"--param osdSize={device_size}Gi" cmd = ( f"ibmcloud ks cluster addon enable openshift-data-foundation --cluster {clustername} -f --version " diff --git a/ocs_ci/ocs/defaults.py b/ocs_ci/ocs/defaults.py index 3d9378b96f9..5a9698923bc 100644 --- a/ocs_ci/ocs/defaults.py +++ b/ocs_ci/ocs/defaults.py @@ -37,6 +37,7 @@ # Default device size in Gigs DEVICE_SIZE = 100 +DEVICE_SIZE_IBM_CLOUD_MANAGED = 512 OCS_OPERATOR_NAME = "ocs-operator" ODF_OPERATOR_NAME = "odf-operator"