Fail to delete the "test" namespace when installing on an existing OCP cluster
Closed this issue · 1 comments
jmereaux commented
When performing the installation of iteration zero on an existing OCP cluster, the process fails when attempting to delete the test
namespace that is not present on the cluster.
module.dev_cluster_namespaces.null_resource.delete_namespaces[2] (local-exec): Executing: ["/bin/sh" "-c" "/home/devops/src/workspace/.terraform/modules/17ebe3ac8e95e4efdb3af7dad15b5b43/generic/cluster/namespaces/scripts/deleteNamespace.sh test"]
module.dev_cluster_namespaces.null_resource.delete_namespaces[0]: Creation complete after 0s (ID: 5564851789359941061)
module.dev_cluster_namespaces.null_resource.delete_namespaces[1]: Creation complete after 0s (ID: 8321762577535941792)
module.dev_cluster_namespaces.null_resource.delete_namespaces[2] (local-exec): *** Deleting namespace and contained resources: test
module.dev_cluster_namespaces.null_resource.delete_namespaces[3]: Creation complete after 0s (ID: 2680832943869001292)
module.dev_cluster_namespaces.null_resource.delete_namespaces[2] (local-exec): Error from server (NotFound): namespaces "test" not found
Error: Error applying plan:
1 error occurred:
* module.dev_cluster_namespaces.null_resource.delete_namespaces[2]: Error running command '/home/devops/src/workspace/.terraform/modules/17ebe3ac8e95e4efdb3af7dad15b5b43/generic/cluster/namespaces/scripts/deleteNamespace.sh test': exit status 1. Output: *** Deleting namespace and contained resources: test
Error from server (NotFound): namespaces "test" not found
Managed to work around the issue by creating a dummy test
project on the cluster and re-launching the runTerraform.sh script.
Any idea on what I did wrong?
Thanks
seansund commented
The delete namespace
logic has been updated to do a kill-ns
if the namespace is not deleted within 60s