-
Bug
-
Resolution: Duplicate
-
Undefined
-
None
-
4.16.0
Description of problem:
When running the command `openshift-install destroy cluster` with `openshift-install v4.16.0` to uninstall an IPI cluster, the directory `.clusterapi_output` is not deleted and remains in the installation directory.
Version-Release number of selected component (if applicable):
$ openshift-install version openshift-install 4.16.0 built from commit 0dc3033888f4cae22e5e5897921422f7180c4033 release image quay.io/openshift-release-dev/ocp-release@sha256:3717338045df06e31effea46761b2c7e90f543cc4f00547af8158dd6aea868c3 release architecture amd64
How reproducible:
everytime
Steps to Reproduce:
$ ls -la total 4 drwxr-xr-x. 1 ec2-user ec2-user 290 Jul 9 10:11 . drwxr-xr-x. 1 ec2-user ec2-user 642 Jul 9 09:42 .. -rwxr-xr-x. 1 ec2-user ec2-user 3759 Jul 9 09:43 install-config.yaml $ openshift-install create cluster --dir=. --log-level=info INFO Credentials loaded from the "default" profile in file "/home/ec2-user/.aws/credentials" INFO Consuming Install Config from target directory [...] INFO Install complete! INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/ec2-user/OpenShift/install/auth/kubeconfig' INFO Access the OpenShift web-console here: https://console-openshift-console.apps.ec2-user-red.apac.aws.cee.support INFO Login to the console with user: "kubeadmin", and password: "XXXXX-XXXXX-XXXXX-XXXXX" INFO Time elapsed: 49m36s $ ls -la total 6828 drwxr-xr-x. 1 ec2-user ec2-user 290 Jul 9 10:11 . drwxr-xr-x. 1 ec2-user ec2-user 642 Jul 9 09:42 .. drwxr-x---. 1 ec2-user ec2-user 56 Jul 9 09:44 auth drwxr-x---. 1 ec2-user ec2-user 1908 Jul 9 10:11 .clusterapi_output -rw-r-----. 1 ec2-user ec2-user 444 Jul 9 09:44 metadata.json -rw-r--r--. 1 ec2-user ec2-user 1797755 Jul 9 10:33 .openshift_install.log -rw-r-----. 1 ec2-user ec2-user 4877453 Jul 9 09:50 .openshift_install_state.json -rw-r-----. 1 ec2-user ec2-user 1335 Jul 9 09:44 terraform.platform.auto.tfvars.json -rw-r-----. 1 ec2-user ec2-user 305166 Jul 9 09:44 terraform.tfvars.json drwxr-x---. 1 ec2-user ec2-user 80 Jul 9 09:44 tls $ openshift-install destroy cluster --dir=. --log-level=info INFO Credentials loaded from the "default" profile in file "/home/ec2-user/.aws/credentials" INFO Terminated instance=i-0b76410f3e5829c9c [...] INFO Deleted id=vpc-0b2c29e78b084c207 resourceType=vpc INFO Time elapsed: 5m38s INFO Uninstallation complete! $ ls -la total 1800 drwxr-xr-x. 1 ec2-user ec2-user 80 Jul 9 10:39 . drwxr-xr-x. 1 ec2-user ec2-user 642 Jul 9 09:42 .. drwxr-x---. 1 ec2-user ec2-user 88 Jul 9 10:39 .clusterapi_output -rw-r--r--. 1 ec2-user ec2-user 1839931 Jul 9 10:39 .openshift_install.log
Actual results:
Expected results:
Additional info:
This directory is generated due to changes in ClusterAPI, but if it is not used after uninstalling, it should be deleted during the uninstall process. Additionally, if this directory is left and you try to place a new `install-config.yaml` and run `openshift-install create cluster` again, the cluster installation fails with an error.
$ openshift-install create cluster --dir=. --log-level=info INFO Credentials loaded from the "default" profile in file "/home/ec2-user/.aws/credentials" WARNING Making control-plane schedulable by setting MastersSchedulable to true for Scheduler cluster settings INFO Consuming Install Config from target directory FATAL failed to fetch Cluster: failed to load asset "Cluster": local infrastructure provisioning artifacts already exist. There may already be a running cluster
- duplicates
-
OCPBUGS-35542 [CAPI install] envtest.kubeconfig is not deleted when destroying cluster
- Closed