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

State inconsistent when Helm_Release Apply Fails #338

Closed
FridayPush opened this issue Sep 13, 2019 · 7 comments
Closed

State inconsistent when Helm_Release Apply Fails #338

FridayPush opened this issue Sep 13, 2019 · 7 comments

Comments

@FridayPush
Copy link

Applied a large helm chart and it failed part way through when the chart was trying to observe an ingress that was incorrectly configured. This apply failure resulted in no resources being written to state, but many resources were deployed in the cluster. This created a situation where we're unable to reapply due to existing resources; unable to delete due to it not existing in state; and we don't know the full list of resources created to manually clean up.

End of apply log, the end of the quoted section is everything that was logged about the failure.

module.cicd-full.helm_release.jenkins-x-platform[0]: Still creating... [7m0s elapsed]
module.cicd-full.helm_release.jenkins-x-platform[0]: Still creating... [7m10s elapsed]

Error: rpc error: code = Unknown desc = timed out waiting for the condition

  on envs/dev/cicd/jx.tf line 38, in resource "helm_release" "jenkins-x-platform":
  38: resource "helm_release" "jenkins-x-platform" {

Terraform v0.12.8
Client: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.1", GitCommit:"5270352a09c7e8b6e8c9593002a73535276507c0", GitTreeState:"clean"}
Resource: Helm_release

Terraform Version

Expected Behavior

During a failure to completely applyhelm_release, some method of viewing all created and applied resources should be available. Preferably in State

Actual Behavior

State block still has an empty block for the helm_release after failure, resulting in partial deployment.

Steps to Reproduce

Deploy a helm chart that has a condition that can't be met (observe endpoint that doesnt' exist for success/etc

Appears to be a duplicate of #279, but that hasn't had a response since May.

@sebglon
Copy link
Contributor

sebglon commented Sep 20, 2019

Yes i have the same wit terraform 0.11.14 and helm provider 0.10.2

@rporres
Copy link

rporres commented Oct 21, 2019

How do you fix this issue? Does helm destroy works or do you have to fix it manually via kubectl?

@prokvk
Copy link

prokvk commented Nov 29, 2019

+1

@ghost
Copy link

ghost commented Jan 22, 2020

I have the same issue with terraform v0.12.9

@aRobinson-R7
Copy link

@rporres - I have had success removing the helm resource from terraform state and the doing helm delete <resource> --purge before reapplying
It would be good if the provider had import functionality

@mcuadros
Copy link
Collaborator

Closing this issue since is making reference to a version based on Helm 2, if this is still valid to the master branch please reopen it. Thanks.

@ghost
Copy link

ghost commented May 11, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators May 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants