Skip to content

Commit

Permalink
Remove Deprovision on failure from OCP provisioning task (#1924)
Browse files Browse the repository at this point in the history
* rm Deprovision on failure

* remove deprovision-related resources

* update fail message
  • Loading branch information
bdattoma authored Oct 16, 2024
1 parent 368804b commit 4950bcc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 87 deletions.
72 changes: 0 additions & 72 deletions ods_ci/tasks/Resources/Provisioning/Hive/deprovision.robot

This file was deleted.

8 changes: 2 additions & 6 deletions ods_ci/tasks/Resources/Provisioning/Hive/provision.robot
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
*** Settings ***
Resource deprovision.robot
Resource ../../../../tests/Resources/Common.robot
Library Process

Expand Down Expand Up @@ -72,9 +71,7 @@ Handle Already Existing Cluster
${result} = Run Process oc -n ${hive_namespace} get cd ${cluster_name} -o json | jq -r '.status.webConsoleURL' --exit-status shell=yes # robocop: disable:line-too-long
END
IF ${result.rc} != 0
Log Cluster '${cluster_name}' has previously failed to be provisioned - Cleaning Hive resources
... console=True
Delete Cluster Configuration
FAIL Cluster '${cluster_name}' has previously failed to be provisioned but some Hive and/or Cloud resources are still present.
ELSE
FAIL Cluster '${cluster_name}' is already in use, please choose a different name.
END
Expand Down Expand Up @@ -210,9 +207,8 @@ Wait For Cluster To Be Ready
${provision_status} = Run Process oc -n ${pool_namespace} get cd ${clusterdeployment_name} -o json shell=yes # robocop: disable:line-too-long
${custer_status} = Run Process oc -n ${hive_namespace} get clusterclaim ${claim_name} -o json shell=yes
Log Cluster '${cluster_name}' deployment had errors, see: ${\n}${provision_status.stdout}${\n}${custer_status.stdout} level=ERROR # robocop: disable:line-too-long
Log Cluster '${cluster_name}' install completed, but it is not accessible - Cleaning Hive resources now
Log Cluster '${cluster_name}' install completed, but it is not accessible
... console=True
Deprovision Cluster
FAIL Cluster '${cluster_name}' provisioning failed. Please look into the logs for more details.
END
Log Cluster '${cluster_name}' install completed and accessible at: ${web_access.stdout} console=True
Expand Down
9 changes: 0 additions & 9 deletions ods_ci/tasks/Tasks/provision_self_managed_cluster.robot
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Documentation Provision Self-Managed clusters for testing. The cluster provis
Metadata provision
Resource ../../tests/Resources/Common.robot
Resource ../Resources/Provisioning/Hive/provision.robot
Resource ../Resources/Provisioning/Hive/deprovision.robot
Resource ../Resources/Provisioning/Hive/gpu-provision.robot
Resource ../Resources/Provisioning/Hive/disconnect.robot
Library OperatingSystem
Expand Down Expand Up @@ -38,14 +37,6 @@ Provision Self-Managed Cluster
Login To Cluster
Pass Execution Self-Managed Cluster ${cluster_name} provisionend successfully

Deprovision Self-Managed Cluster
[Documentation] Deprovision a self-managed cluster
[Tags] self_managed_deprovision
[Setup] Run Keywords Set Hive Default Variables
... AND
... Set ClusterPool Variables
Deprovision Cluster

Add GPU Node To Self-Managed AWS Cluster
[Documentation] Add GPU node to self-managed cluster
[Tags] gpu_node_aws_self_managed_provision
Expand Down

0 comments on commit 4950bcc

Please sign in to comment.