Repository navigation
Closed
Labels
Description
Output of helm version:
$ helm version
Client: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}
Output of kubectl version:
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:53:57Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:25:46Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.): Amazon
What is happening:
After few broken deployments, helm (or tiller) is broken and all subsequent deployments (no matter if fixed or still broken) ends with following error: app-name has no deployed releases
How to reproduce:
We have
spec:
revisionHistoryLimit: 1
but i think it is not relevant.
Path a:
- Deploy any service - working
- Break it, e.g. by exiting containers after startup, so the whole deployment will be broken
- Repeat it exactly 3 times
- All next deployments will have error, no matter if fixed or broken
Path b:
- Deploy broken service - see Add README.md to guestbook example. Remove local replicatedservice.py… #2 above
- All next deployments will have error, no matter if fixed or broken
Reacted by Valery Lezhebokov, Alex Teldekov, Christian Lipphardt, Jaroslaw Wietek, Mangirdas Vaina, Grzegorz Demecki, Tomasz Woliński, boxboatjeremy, paulogtabarro, Oluwafemi Olofintuyi and 73 more
Reacted by Alessandro Tagliapietra, Oleksandr Semak, charlie, Драган Вучановић and Ben Carver
Reacted by Pieter, Alessandro Tagliapietra, Oleksandr Semak, felipeceballosglobant, Gloria Palma and Nico Van Looy
Activity
reschex commentedon Apr 18, 2019
Hi - can you give some more detail on how you're deploying? are you using
helm upgrade --installby any chance? And if you do, what is the state of the deployment when it's broken (helm ls) - presumably it isFailed?If this is the case, a
helm delete --purge <deployment>should do the trick.sta-szek commentedon Apr 18, 2019
hi, sorry for missing info.
Yes i am using
helm upgrade --installAnd yes, the deployment stays in
Failedforever.Unfortunately the
helm delete --purge <deployment>is not an option here at all. I cannot just delete production services because of that :)The question is why helm cannot recover after 3 consecutive failures.
rimusz commentedon Apr 18, 2019
the only way to sort that without deleting the release add
--forcesta-szek commentedon Apr 18, 2019
--forceto what? tohelm upgrade --install?and if yes, then it means that above issue is actually expected feature and we should use
--forcewith every deployment? -- if yes, then it means that it will deploy broken releases forcibly?rimusz commentedon Apr 18, 2019
yes, of course to
helm upgrade --install:)and yes you should use
--forcewith every deploymentsta-szek commentedon Apr 18, 2019
does it means that
--forcewill deploy broken releases forcibly as well? - I mean, if pod will be broken and restarting all the time, will it delete old pods and schedule new ones?--force force resource update through delete/recreate if neededwhat is the
deletecondition? can you elaborate how it works exactly? the description is definitely too short for such a critical flag - I expect it does thousands of things under the hood.BTW I really dont want to end up with deleted production services, so the
--forceflag is not an option for me.and do you really think that it is not an issue?
even the error message is wrong:
app-name has no deployed releaseswhich states that there is no deployed releases
while there is but with state
Failedand helm does not even try to fix it :( -- by fixing I mean just please try to deploy it, instead of giving up on the very beginningAmazingTurtle commentedon May 14, 2019
See #3208
bakayolo commentedon Nov 8, 2019
Cannot agree more. Our production is experiencing the same error. So deleting the chart is not an option, and forcing the install seems dangerous. This error is still present with Helm 3. So might be good to include a fix or safer workaround.
johannges commentedon Nov 12, 2019
it can be fixed by removing "status": "deployed", in storage.go:136
See: 638229c
I will fix the Pull Request when i have time.
bacongobbler commentedon Nov 12, 2019
The code in place was originally correct. Removing
status: deployedfrom the query results with Helm finding the latest release to upgrade from, regardless of the state it is currently in which could lead to unintended results. It circumvents the problem temporarily, but it introduces much bigger issues further down the road.If you can provide the output of
helm historywhen you hit this bug, that would be helpful. It's more helpful to determine how one ends in a case where the release ledger has no releases in the "deployed" state.bastoche commentedon Nov 19, 2019
I'm encountering this issue when deploying for the first time to a new cluster. Should I use
--forcetoo?japzio commentedon Nov 25, 2019
I encountered this issue when I deleted the previous release without using
--purgeoption.Helm Version
tomaustin700 commentedon Nov 26, 2019
I am also encountering this issue.
henrikb123 commentedon Dec 2, 2019
@bacongobbler
I hit this with helm3. History is completely empty when this happens, although broken k8s resources are there since attempt 1.
Reproduction seems really easy:
-> Error: UPGRADE FAILED: "foo" has no deployed releases
112 remaining items
omnibs commentedon Oct 13, 2020
+1 to this. We still have to google around, to find this thread, to understand what's a
pending-installrelease, so we can begin to reason about this error message.sajtrus commentedon Oct 20, 2020
I had issues with
helm upgradeand it lead me here. It was solved by adding-n <namespace>. Maybe it will help someone out there.Jenishk56 commentedon Oct 27, 2020
For Helm3, Could be solved through patch
kubectl -n <namespace> patch secret <release-name>.<version> --type=merge -p '{"metadata":{"labels":{"status":"deployed"}}}'release-nameandversion- Can be seen fromkubectl get secrets -n <namespace> | grep helmcinpol commentedon Jul 12, 2021
For Helm 2, it can solved through:
kubectl -n kube-system patch configmap release-name.v123 --type=merge -p '{"metadata":{"labels":{"STATUS":"DEPLOYED"}}}'wind57 commentedon Oct 20, 2021
the patch does not work anymore:
and :
the
statusis now elsewhere :good luck editing that base64 and replacing it.
We found no solution but to delete the secret.
markdingram commentedon Aug 5, 2022
something like this worked for us:
Handle interrupted helm releases in applier
Handle interrupted helm releases in applier
Handle interrupted helm releases in applier
Handle interrupted helm releases in applier
Handle interrupted helm releases in applier
Handle interrupted helm releases in applier
Handle interrupted helm releases in applier
Remove --force flag from helm upgrade to fix race condition errors
Remove --force flag from helm upgrade to fix race condition errors (#…