diff --git a/ocs_ci/deployment/metallb.py b/ocs_ci/deployment/metallb.py index 8862dcb6ac4b..38e4f1363119 100644 --- a/ocs_ci/deployment/metallb.py +++ b/ocs_ci/deployment/metallb.py @@ -315,7 +315,7 @@ def create_metallb_instance(self): ) templating.dump_data_to_temp_yaml(metallb_inst_data, metallb_inst_file.name) - retry(CommandFailed, tries=3, delay=15)(exec_cmd)( + retry(CommandFailed, tries=18, delay=30)(exec_cmd)( f"oc apply -f {metallb_inst_file.name}", timeout=240 ) @@ -383,7 +383,7 @@ def create_ip_address_pool(self): ) templating.dump_data_to_temp_yaml(ipaddresspool_data, ipaddresspool_file.name) - retry(CommandFailed, tries=3, delay=15)(exec_cmd)( + retry(CommandFailed, tries=12, delay=15)(exec_cmd)( f"oc apply -f {ipaddresspool_file.name}", timeout=240 ) diff --git a/ocs_ci/deployment/provider_client/storage_client_deployment.py b/ocs_ci/deployment/provider_client/storage_client_deployment.py index 2af97a2205d4..c57419f7e876 100644 --- a/ocs_ci/deployment/provider_client/storage_client_deployment.py +++ b/ocs_ci/deployment/provider_client/storage_client_deployment.py @@ -26,6 +26,7 @@ wait_for_machineconfigpool_status, ) from ocs_ci.utility import templating, kms as KMS, version +from ocs_ci.utility.retry import retry from ocs_ci.deployment.deployment import Deployment, create_catalog_source from ocs_ci.deployment.baremetal import disks_available_to_cleanup from ocs_ci.deployment.encryption import ( @@ -235,8 +236,14 @@ def provider_and_native_client_installation( templating.dump_data_to_temp_yaml( storage_cluster_data, constants.OCS_STORAGE_CLUSTER_YAML ) - self.ocp_obj.exec_oc_cmd( - f"apply -f {constants.OCS_STORAGE_CLUSTER_YAML}" + retry( + CommandFailed, + tries=12, + delay=15, + )( + self.ocp_obj.exec_oc_cmd( + f"apply -f {constants.OCS_STORAGE_CLUSTER_YAML}" + ) ) else: storage_cluster_data = templating.load_yaml( @@ -259,8 +266,14 @@ def provider_and_native_client_installation( templating.dump_data_to_temp_yaml( storage_cluster_data, constants.OCS_STORAGE_CLUSTER_UPDATED_YAML ) - self.ocp_obj.exec_oc_cmd( - f"apply -f {constants.OCS_STORAGE_CLUSTER_UPDATED_YAML}" + retry( + CommandFailed, + tries=12, + delay=15, + )( + self.ocp_obj.exec_oc_cmd( + f"apply -f {constants.OCS_STORAGE_CLUSTER_UPDATED_YAML}" + ) ) # Creating toolbox pod