You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Helm v3.4 Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress #8987
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:
Reacted by Constantin Bugneac, Raghav Nauhria, Andrea Vouk, klose4711, Bogdan P., sbostk, Pavlo Bashynskyi, Jorge Castellote, Tomek Święcicki, magick93 and 22 more
Reacted by Oleksandr Chabaiev, Asher Manangan and Bruno Arruda
We ask to please provide a test case or some way for the maintainers to test and reproduce the error you are experiencing. This way we can better help understand the issue and determine if there's a fix we can apply to the next release. In most cases a simple set of steps to reproduce the issue on our end can help expedite the process.
@jlcrow Yikes. While I wouldn't ask you to do this in production could you do an upgrade while using the --debug and -v 6 flags set. This will provide more diverse output that can help us find the problem.
@jlcrow Yikes. While I wouldn't ask you to do this in production could you do an upgrade while using the --debug and -v 6 flags set. This will provide more diverse output that can help us find the problem.
Thanks @mattfarina, I'm pushing up a branch for deployment and will test with both versions of helm to see if I can reproduce
I 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:
STDERR:
Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
I'm using helmfile, not helm directly, maybe its another problem with helmfile not sending the SIGTERM correctly.
Reacted by Ryan Harlich, Fabian Berg, timscriv, Constantin Bugneac, Konstantin Skaburskas, qper, Tomek Święcicki, Ben Carver, Eddy Arrel PEPY TCHOFFO, Asher Manangan and 9 more
Hi @bacongobbler, the described workaround did indeed works!
$ helm history kyc-api
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
1 Mon Nov 9 14:57:36 2020 pending-install generic-base-0.2.1 0.1.0 Initial install underway
$ helm rollback kyc-api 1
Rollback was a success! Happy Helming!
$ helm history kyc-api
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
1 Mon Nov 9 14:57:36 2020 pending-install generic-base-0.2.1 0.1.0 Initial install underway
2 Mon Nov 9 15:06:15 2020 deployed generic-base-0.2.1 0.1.0 Rollback to 1
Looking at the werf/helm PR pretty much confirms that CTRL+C breaks the helm installation on 3.4.0.
Reacted by Venelin Iliev, Diego Miguel Lozano, kumarvijendar, ilyes Ajroud, Gus Narea, Rohini Choudhary, Meir Gabay, Ben van B, BebopFox🦊, Steven Bell and 173 more
Reacted by Dmytro Kabachenko, Weyder Ferreira, Vikas Rathore, Alex Lopes, Roman Pospishenko, Soroush Kazemi, Marcos Soutullo Rodriguez and Egidijus L
Reacted by almerico, Rohini Choudhary, Meir Gabay, Nurlan Farajov, Keith Adler, Stefan Kuksenko, 0x22B8, Rafael Felix Correa, Ziinc, Soroush Kazemi and 11 more
Reacted by Meir Gabay, Richard Chen Zheng, Keith Adler, Rodolfo Assis de Luna, Srinath, Stefan Kuksenko, Pasha Nemchenko, jainsaket1994, 0x22B8, Ognjen S. and 32 more
Reacted by Miroslav Hadzhiev, almerico, Soroush Kazemi, Ki, Gaurav Deshpande, gg, Pavel Klyuev, jelyck, charlotte, Tomas Mendes Ribeiro and 1 more
Reacted by WL, almerico, Soroush Kazemi and jelyck
Okay. Have either of you been able to reproduce this issue?
I know that this particular error can occur when the previous release is in a PENDING_UPGRADE or some other transitional state - usually occurs due to a timeout or someone interrupting the upgrade midway through (hence why I linked to #4558). I have not heard of a regression in Helm 3.4.0 causing an upgrade to enter a transitional state other than through the ticket I linked earlier... Which isn't isolated to just Helm 3.4.
Edit the file release.yaml, changing the label status to deployed and the data.release key to have as its value the contents of the file newreleasevalue created in step 6
Update the secret using the file release.yaml which you just updated:
kubectl apply -n <whatever> -f release.yaml
Run helm list to verify that your release shows up in the list of deployed stuff
Now you can re-run your helm command and it won't die.
Reacted by NullPointer, Minijus L and Service Unavailable
Edit the file release.yaml, changing the label status to deployed and the data.release key to have as its value the contents of the file newreleasevalue created in step 6
Update the secret using the file release.yaml which you just updated:
kubectl apply -n <whatever> -f release.yaml
Run helm list to verify that your release shows up in the list of deployed stuff
Now you can re-run your helm command and it won't die.
Getting this error when running kubectl apply after following those steps:
Warning: resource secrets/sh.helm.release.v1.nextcloud.v11 is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.
The Secret "sh.helm.release.v1.nextcloud.v11" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
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.json cat release-contents.json | gzip | base64 -w 0 | base64 -w 0 > newreleasevalue
UPDATE: found a workaround. Use kubectl edit to apply the changes instead of kubectl 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.
All went fine, because the end k8s config ended up being just the same.
Could be nice if helm had an option for this case: 'hey look it's a pending update, but the deployed stuff is exactly what it should be so I'll just replace that release'.
Activity
bacongobbler commentedon Nov 5, 2020
Hi @jlcrow.
We ask to please provide a test case or some way for the maintainers to test and reproduce the error you are experiencing. This way we can better help understand the issue and determine if there's a fix we can apply to the next release. In most cases a simple set of steps to reproduce the issue on our end can help expedite the process.
Thanks.
mattfarina commentedon Nov 5, 2020
@jlcrow Yikes. While I wouldn't ask you to do this in production could you do an upgrade while using the
--debugand-v 6flags set. This will provide more diverse output that can help us find the problem.jlcrow commentedon Nov 6, 2020
Thanks @mattfarina, I'm pushing up a branch for deployment and will test with both versions of helm to see if I can reproduce
Skaronator commentedon Nov 6, 2020
I 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.
bacongobbler commentedon Nov 6, 2020
@Skaronator and @jlcrow can you check and see if the same symptoms and workarounds described in #4558 help with your cases?
[v3.4.0][helm for werf] Remove errPending on upgrade
Skaronator commentedon Nov 9, 2020
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.
bacongobbler commentedon Nov 9, 2020
Thanks for following up. Closing as a duplicate of #4558.
jlcrow commentedon Nov 9, 2020
@bacongobbler I don't understand how this was determined to be the same issue? There's no ctrl+c running in my pipeline.
Skaronator commentedon Nov 9, 2020
I still think there is a regression in 3.4.0 since I never had this issue before.
jlcrow commentedon Nov 9, 2020
I've tried to reproduce this in a branch of my project and have been unable to at this point.
bacongobbler commentedon Nov 12, 2020
Okay. Have either of you been able to reproduce this issue?
I know that this particular error can occur when the previous release is in a PENDING_UPGRADE or some other transitional state - usually occurs due to a timeout or someone interrupting the upgrade midway through (hence why I linked to #4558). I have not heard of a regression in Helm 3.4.0 causing an upgrade to enter a transitional state other than through the ticket I linked earlier... Which isn't isolated to just Helm 3.4.
55 remaining items
djha-skin commentedon Mar 10, 2022
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 stuffNolij commentedon Mar 19, 2022
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.chance2021 commentedon Mar 23, 2022
This works for me. Thanks! @okunc
matti commentedon Mar 30, 2022
same in 3.8.1, still when killing helm install --upgrade hard enough
matti commentedon Mar 30, 2022
delete all release versions:
kubectl delete secret --field-selector type=helm.sh/release.v1 -l owner=helmfeat(helm for werf): remove errPending on upgrade
feat(helm for werf): remove errPending on upgrade
feat(helm for werf): remove errPending on upgrade
feat(helm for werf): remove errPending on upgrade
AppFwk: Recover apply from helm operation in progress
feat: all changes
feat: all changes
feat: all changes
feat: all changes squashed
azr commentedon Feb 14, 2024
tf apply failed, but I manually changed things in k8s, because prod and we can't wait for tf, and to get the state back right:
1/
2/
All went fine, because the end k8s config ended up being just the same.
Could be nice if helm had an option for this case: 'hey look it's a pending update, but the deployed stuff is exactly what it should be so I'll just replace that release'.