helm: Helm v3.4 Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
Upgraded from Helm 3.3 to Helm 3.4, existing charts started failing the upgrade with the message: Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
At the same time a helm list -n myns the chart disappeared and didn’t show up in the list at all
This is a chart that’s been upgraded over 800 times successfully, only change was the helm version bump, chart failed twice in an attempt to deploy with the command:
helm upgrade --install --namespace myns --timeout 1800s --atomic mychart charts/app/standalone --values values-override.yaml
Once I rolled back to 3.3 I was able to upgrade the chart successfully.
Output of helm version:
version.BuildInfo{Version:"v3.4.0", GitCommit:"7090a89efc8a18f3d8178bf47d2462450349a004", GitTreeState:"dirty", GoVersion:"go1.15.3"}
Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.13", GitCommit:"39a145ca3413079bcb9c80846488786fed5fe1cb", GitTreeState:"clean", BuildDate:"2020-07-15T16:18:19Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.13-gke.401", GitCommit:"eb94c181eea5290e9da1238db02cfef263542f5f", GitTreeState:"clean", BuildDate:"2020-09-09T00:57:35Z", GoVersion:"go1.13.9b4", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.): GKE
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 33
- Comments: 51 (8 by maintainers)
Commits related to this issue
- [v3.4.0][helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which ... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- surfliner: roll helm-kubectl image back to 3.3.4 Due to recurring instances of https://github.com/helm/helm/issues/8987 — committed to surfliner/surfliner-mirror by mcritchlow 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- [helm for werf] Remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which could no... — committed to werf/3p-helm by distorhead 4 years ago
- feat(helm for werf): remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which cou... — committed to werf/3p-helm by distorhead 4 years ago
- feat(helm for werf): remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which cou... — committed to werf/3p-helm by distorhead 4 years ago
- feat(helm for werf): remove errPending on upgrade errPending on upgrade could occur when some deploy has been interrupted by a signal. In this case helm leave release in inconsistent state which cou... — committed to werf/3p-helm by distorhead 4 years ago
Hi @bacongobbler, the described workaround did indeed works!
Looking at the werf/helm PR pretty much confirms that CTRL+C breaks the helm installation on 3.4.0.
Experienced this on Helm
v3.5.2caused by CTRL+C pressed during upgrade. Workaround:kubectl delete secret sh.helm.release.v1.<RELEASE_NAME>.v<LATEST_REVISION>I also have the same issue described on this thread with v3.4.1
helm rollbackcan be a workaround for development machines, but unacceptable on production CI/CD pipelinesWhen the helm CLI receives a SIGTERM signal, it should exit gracefully leaving helm labels in a stable state, allowing further deployments without issues
The issue is not fixed yet and should be open again for further research
the problem is that
helm rollback && helm upgradeis not a suitable solution for production deploymentsI can reproduce with
helm upgrade --install --atomicand interrupting it during the execution. The second run will always return an error:Can be solved by:
I guess this proposal could solve this issue https://github.com/helm/helm/issues/8040
same on
v3.5.4, fixed byI have the same issues. I’ll try to get a debug output if possible.
I noticed this issue usually happens when you upgrade a helm chart with --wait and the upgrade clearly fails (like a crashloopbackoff or something like that) and helm is waiting until it reaches the timeout but the user does CTRL+C before reaching the timeout. After that I’ll get the same error as posted above:
I’m using helmfile, not helm directly, maybe its another problem with helmfile not sending the SIGTERM correctly.
Run ‘helm history —all’, job is probably pending, you’ll have to rollback to last successful deployment.
why is this issue still closed? repro: on empty cluster
and ^C it
this problem is because skaffold/helm was interrupted, i fixed it with deleting the broken namespace
“fixed” by deleting all helm secrets
I still think there is a regression in 3.4.0 since I never had this issue before.
@bacongobbler I haven’t had luck reproducing the issue, I’ve just bumped to 3.4.1 and upgraded the same deployment that previously failed under 3.4.0, will just assume the issue is resolved unless I see something else. Thanks for everything.
on v3.3.4 such case handled fine (see a picture attached). Using helm in GitLab CI and job cancelation became a problem after upgrading to 3.4.0. v3.5.1 has the same issue too.
This works for me. Thanks! @okunc
Thank you, deleting the last secret in the list fixed it in my case too. I’m also on helm
v3.5.4. Also using fluxcd helm-controller - and to bring it back completely, after deleting that secret i also had to run:And now all the failed / stuck releases are working again!
helm history -n (ns) xxx helm rollback -n (ns) xxx (num)
you don’t need to delete all helm secrets but only the last one. it sounds like a workaround but not like fix.
same in 3.8.1, still when killing helm install --upgrade hard enough
Getting this error when running kubectl apply after following those steps:
Also, the command you provided for repacking the release contents only encodes it once, I believe it should be doing that twice, and the yq command is giving output with quotes around. Used these commands instead:
cat release.yaml | yq .data.release | sed 's/"//g' | base64 -d | base64 -d | gunzip > release-contents.jsoncat release-contents.json | gzip | base64 -w 0 | base64 -w 0 > newreleasevalueUPDATE: found a workaround. Use
kubectl editto apply the changes instead ofkubectl apply. Make sure you know how to paste in your terminal editor. I’d recommend just commenting out the old line to remove it instead of deleting it by hand, does same thing.Workaround:
release.yaml, changing the labelstatustodeployedand thedata.releasekey to have as its value the contents of the filenewreleasevaluecreated in step 6release.yamlwhich you just updated:helm listto verify that your release shows up in the list of deployed stuffCuriously, the way we currently fix it in our cluster is by running the same upgrade command with Helm version
3.2.1(the Helm plugin for our CI uses3.6.2, previously3.2.4which had no such issues). Not only it goes through just fine, but after that it works again with the current version.v3.6.3brought me here, same behavior.Sure.
v3.6.2is the problematic version. It’s the older version,v3.2.4(notv3.4.2, AFAIK it’s already affected by the bug), that fixes the bug. I run exactly the samehelm upgrade --installcommand as our CI from my local machine using this older version when this error comes up, and it updates the release just fine - and our CI with the newer Helm version also works after.I wonder what happened from v3.3 to v3.4 that caused this issue
Had this issue because I tried to cancel a helm deployment from the command line. The workaround suggested by @Skaronator using a
rollbackgot me past the error. Helmhistorylooks like this now:The OP determined his issue was a duplicate of #4558. As #4558 describes, there are a few cases where a
helm upgradecan enter the PENDING_UPGRADE state in the event of a timeout. Ahelm rollback && helm upgraderesolves the issue; hence why it was closed as a duplicate of #4558 (the symptoms and the workaround is identical).If you do not believe you are experiencing the same issue as the OP, please open a new ticket.
I just tried it with
the end result is the same.
Why was this issue closed?