Skip to content

app-name has no deployed releases #5595

Closed

Description

@sta-szek

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:

  1. Deploy any service - working
  2. Break it, e.g. by exiting containers after startup, so the whole deployment will be broken
  3. Repeat it exactly 3 times
  4. All next deployments will have error, no matter if fixed or broken

Path b:

  1. Deploy broken service - see Add README.md to guestbook example. Remove local replicatedservice.py… #2 above
  2. All next deployments will have error, no matter if fixed or broken

Activity

  1. reschex commented on Apr 18, 2019

    @reschex

    Hi - can you give some more detail on how you're deploying? are you using helm upgrade --install by any chance? And if you do, what is the state of the deployment when it's broken (helm ls) - presumably it is Failed?

    If this is the case, a helm delete --purge <deployment> should do the trick.

  2. sta-szek commented on Apr 18, 2019

    @sta-szek
    Author

    hi, sorry for missing info.
    Yes i am using helm upgrade --install
    And yes, the deployment stays in Failed forever.
    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.

  3. rimusz commented on Apr 18, 2019

    @rimusz
    Contributor

    the only way to sort that without deleting the release add --force

  4. sta-szek commented on Apr 18, 2019

    @sta-szek
    Author

    --force to what? to helm upgrade --install ?
    and if yes, then it means that above issue is actually expected feature and we should use --force with every deployment? -- if yes, then it means that it will deploy broken releases forcibly?

  5. rimusz commented on Apr 18, 2019

    @rimusz
    Contributor

    yes, of course to helm upgrade --install :)
    and yes you should use --force with every deployment

  6. sta-szek commented on Apr 18, 2019

    @sta-szek
    Author

    does it means that --force will 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 needed
    what is the delete condition? 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 --force flag 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 releases
    which states that there is no deployed releases
    while there is but with state Failed and 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 beginning

  7. AmazingTurtle commented on May 14, 2019

    @AmazingTurtle

    See #3208

  8. bakayolo commented on Nov 8, 2019

    @bakayolo

    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.

  9. johannges commented on Nov 12, 2019

    @johannges

    it can be fixed by removing "status": "deployed", in storage.go:136

    See: 638229c

    I will fix the Pull Request when i have time.

  10. bacongobbler commented on Nov 12, 2019

    @bacongobbler
    Member

    The code in place was originally correct. Removing status: deployed from 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 history when 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.

  11. bastoche commented on Nov 19, 2019

    @bastoche

    I'm encountering this issue when deploying for the first time to a new cluster. Should I use --force too?

  12. japzio commented on Nov 25, 2019

    @japzio

    I encountered this issue when I deleted the previous release without using --purge option.

    helm delete --purge <release-name>
    

    Helm Version

    Client: &version.Version{SemVer:"v2.15.X"}
    Server: &version.Version{SemVer:"v2.15.X"}
    
  13. tomaustin700 commented on Nov 26, 2019

    @tomaustin700

    I am also encountering this issue.

  14. henrikb123 commented on Dec 2, 2019

    @henrikb123

    @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:

    1. helm upgrade --install "something with a pod that has a container that exits with error"
    2. correct what caused the container to exit, e.g. value with invalid arg for the executable inside container, and try again
      -> Error: UPGRADE FAILED: "foo" has no deployed releases
  15. 112 remaining items

  16. omnibs commented on Oct 13, 2020

    @omnibs

    What do you think about possibly adding some additional information to Helm error message with link to this thread + some suggestions on what to do?

    +1 to this. We still have to google around, to find this thread, to understand what's a pending-install release, so we can begin to reason about this error message.

  17. sajtrus commented on Oct 20, 2020

    @sajtrus

    I had issues with helm upgrade and it lead me here. It was solved by adding -n <namespace>. Maybe it will help someone out there.

  18. Jenishk56 commented on Oct 27, 2020

    @Jenishk56

    For Helm3, Could be solved through patch
    kubectl -n <namespace> patch secret <release-name>.<version> --type=merge -p '{"metadata":{"labels":{"status":"deployed"}}}'

    release-name and version - Can be seen from kubectl get secrets -n <namespace> | grep helm

  19. cinpol commented on Jul 12, 2021

    @cinpol

    For Helm 2, it can solved through:
    kubectl -n kube-system patch configmap release-name.v123 --type=merge -p '{"metadata":{"labels":{"STATUS":"DEPLOYED"}}}'

  20. wind57 commented on Oct 20, 2021

    @wind57

    the patch does not work anymore:

    kubectl describe secret sh.helm.release.v1.test-1.v1
    Name:         sh.helm.release.v1.test-1.v1
    Namespace:    default
    Labels:       modifiedAt=1634763779
                  name=test-1
                  owner=helm
                  status=test
                  version=1
    Annotations:  <none>
    
    Type:  helm.sh/release.v1
    
    Data
    ====
    release:  3100 bytes
    

    and :

    helm ls
    NAME  	NAMESPACE	REVISION	UPDATED                             	STATUS  	CHART        	APP VERSION
    test-1	default  	1       	2021-10-20 17:02:59.333187 -0400 EDT	deployed	mychart-0.1.0	1.16.0
    

    the status is now elsewhere :

    kubectl get secret sh.helm.release.v1.test-1.v1 -o json | jq .data.release | tr -d '"' | base64 -d | base64 -d | gzip -d | jq | grep status
    

    good luck editing that base64 and replacing it.

    We found no solution but to delete the secret.

  21. markdingram commented on Aug 5, 2022

    @markdingram

    something like this worked for us:

    
    $ kubectl get secret sh.helm.release.v1.xxx.v123 -o json > secret.orig.json
    $ cat secret.orig.json | jq -r '.data.release' | base64 -d | base64 -d | gzip -d > secret.json
    
    $ vi secret.json 
    <- change status to "deployed"
    
    $ cat secret.json | gzip | base64 | base64 > secret.encoded
    $ jq -r '.data.release = $input' secret.orig.json --rawfile input secret.encoded > secret.new.json
    $ kubectl apply -f secret.new.json
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions