Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform Destroy fails regularly for longhorn #11

Open
krumware opened this issue Feb 21, 2024 · 1 comment
Open

Terraform Destroy fails regularly for longhorn #11

krumware opened this issue Feb 21, 2024 · 1 comment

Comments

@krumware
Copy link
Member

the longhorn teardown looks like it has some potential helm lifecycle issues related to the hooks. It also could be an ordering issue? In general, the 5min deadline is being exceeded.

╷
│ Error: context deadline exceeded
│
│
╵
╷
│ Error: warning: Hook pre-delete longhorn/templates/uninstall-job.yaml failed: 1 error occurred:
│       * jobs.batch "longhorn-uninstall" is forbidden: unable to create new content in namespace longhorn-system because it is being terminated
│
│
│
│
╵
╷
│ Error: uninstallation completed with 1 error(s): context deadline exceeded
│
│
╵
@swaphb
Copy link
Contributor

swaphb commented Mar 28, 2024

Removing the longhorn resources from the terraform state file will allow for the cluster to be removed without terraform trying to uninstall the helm resource prior to cluster deletion. This can be done with the following commands:

terraform state rm module.civo-cloud-native.module.longhorn.helm_release.longhorn
terraform state rm module.civo-cloud-native.module.longhorn.kubernetes_namespace.longhorn
terraform destroy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants