From 30bff497b650d0a2b2faffc3ab26e837b801d161 Mon Sep 17 00:00:00 2001 From: Petr Balogh Date: Thu, 23 May 2024 08:57:46 +0200 Subject: [PATCH] Allow test upgrade waitTimeoutForHealthyOSDInMinutes For testing BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2276694 Signed-off-by: Petr Balogh --- conf/README.md | 1 + ocs_ci/deployment/deployment.py | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/conf/README.md b/conf/README.md index cb0f67c987e..f5a5ee07a50 100644 --- a/conf/README.md +++ b/conf/README.md @@ -313,6 +313,7 @@ higher priority). * `nodepool_replicas` - number of replicas of nodepool for each cluster * `hosted_odf_registry` - registry for hosted ODF * `hosted_odf_version` - version of ODF to be deployed on hosted clusters +* `wait_timeout_for_healthy_osd_in_minutes` - timeout waiting for healthy OSDs before continuing upgrade (see https://bugzilla.redhat.com/show_bug.cgi?id=2276694 for more details) #### UPGRADE diff --git a/ocs_ci/deployment/deployment.py b/ocs_ci/deployment/deployment.py index 5a5667729ec..4ef36a0eba8 100644 --- a/ocs_ci/deployment/deployment.py +++ b/ocs_ci/deployment/deployment.py @@ -1455,6 +1455,17 @@ def deploy_ocs_via_operator(self, image=None): cluster_data["spec"]["multiCloudGateway"] = { "externalPgConfig": {"pgSecretName": constants.NOOBAA_POSTGRES_SECRET} } + # To be able to verify: https://bugzilla.redhat.com/show_bug.cgi?id=2276694 + wait_timeout_for_healthy_osd_in_minutes = config.ENV_DATA.get( + "wait_timeout_for_healthy_osd_in_minutes" + ) + if wait_timeout_for_healthy_osd_in_minutes: + cluster_data.setdefault("spec", {}).setdefault( + "managedResources", {} + ).setdefault("cephCluster", {}) + cluster_data["spec"]["managedResources"]["cephCluster"][ + "waitTimeoutForHealthyOSDInMinutes" + ] = wait_timeout_for_healthy_osd_in_minutes cluster_data_yaml = tempfile.NamedTemporaryFile( mode="w+", prefix="cluster_storage", delete=False