Skip to content

Helm upgrade with --wait is waiting even when all resources are ready #2426

Closed

Description

@eduardobaitello

I just installed a new release, then I upgraded the image tag for one of my Deployments inside a chart.
After that, I executed a helm upgrade mychart myrelease --wait --timeout 9999. Tiller logs only detected changes in the above described Deployment, creating a new pod and ReplicaSet with the new image. Then, the upgrade process get stuck in "waiting for resources", even when all my pods are ready and running:

[user@hostname ~]$ kubectl get po -n mynamespace
NAME                                         READY     STATUS    RESTARTS   AGE
XXXXX-2061248956-1k0xc                       1/1       Running   0          14m
XXXXXXXX-3687332959-bjb5b                    1/1       Running   0          14m
new-created-pod-2470432599-38k9j             1/1       Running   0          1m
XXXXXX-1811469710-3pm6k                      1/1       Running   0          14m
XXX-2438109-qv4m1                            1/1       Running   0          14m

2017/05/10 18:24:01 wait.go:47: beginning wait for resources with timeout of 2h46m39s

So I figured out that the problem is that a new ReplicaSet was created, but helm seems like also waiting for the old one to get all resources ready.
I manually deleted the old-replica-set-320589364, and the upgrade was completed.

[user@hostname ~]$ kubectl get rs -n mynamespace
NAME                                   DESIRED   CURRENT   READY     AGE
XXXXX-2061248956                       1         1         1         21m
XXXXXXXX-3687332959                    1         1         1         21m
new-created-replica-set-2470432599     1         1         1         7m
old-replica-set-320589364              0         0         0         21m
XXXXXX-1811469710                      1         1         1         21m
XXX-2438109                            1         1         1         21m

I'm using Kubernetes v1.6.0 with Helm v2.4.1

Activity

  1. changed the title [-]Helm upgrade with --wait is waiting even when all pods are ready[/-] [+]Helm upgrade with --wait is waiting even when all resources are ready[/+] on May 10, 2017
  2. blakebarnett commented on May 10, 2017

    @blakebarnett

    Seeing this also, k8s 1.6.2, helm 2.4.1

  3. thomastaylor312 commented on May 11, 2017

    @thomastaylor312
    Contributor

    @eduardobaitello Thank you for all of the details. I'll look to see what is happening

  4. thomastaylor312 commented on May 11, 2017

    @thomastaylor312
    Contributor

    Ok, I duplicated this and am working on fixing

  5. added a commit that references this issue on May 11, 2017
    d310612
  6. thomastaylor312 commented on May 11, 2017

    @thomastaylor312
    Contributor

    @eduardobaitello Can you give #2430 a try if you have some time and see if it solves the issue for you?

  7. eduardobaitello commented on May 11, 2017

    @eduardobaitello
    ContributorAuthor

    @thomastaylor312, thanks for the quick help!
    I don't have expertise in Go lang, so I need to wait a patch release with the fix :(
    Thanks again!

  8. added a commit that references this issue on May 17, 2017
    79c492b
  9. chancez commented on May 18, 2017

    @chancez

    I'm still having problems in 2.4.2 with this. Even if I've changed nothing in my release, tiller ends up waiting the full timeout, and no pods are unready, nothing even changed, so everything is already ready, but the wait seems to not detect this.

  10. eduardobaitello commented on May 18, 2017

    @eduardobaitello
    ContributorAuthor

    @chancez check the maxUnavailable value of your Deployments. The --wait flag now uses this value for check the "resources ready" condition (Take a look at Notes).

  11. donaldguy commented on May 22, 2017

    @donaldguy

    can confirm that after upgrading to 2.4.2 I am also having a similar problem (but on a Deployment with strategy: { type: Recreate } )

  12. donaldguy commented on May 22, 2017

    @donaldguy

    In my case downgrading to 2.4.1 fixes my issue, so #2430 is directly implicated

  13. 33 remaining items

  14. boosh commented on Dec 4, 2017

    @boosh
  15. alexppg commented on Apr 10, 2018

    @alexppg

    Hi, is there a solution to this in a 1.5.* cluster?

  16. whereisaaron commented on Apr 11, 2018

    @whereisaaron
    Contributor

    @alexppg no, and even on the latest version I find it problematic/unreliable. I just don't use the --wait option any more. Better to deploy and then script your own wait-for-ready step.

  17. alexppg commented on Apr 11, 2018

    @alexppg

    Shouldn't then be an opened issue about it? This or any other one.

    PD: thanks, I'll do that. @whereisaaron

  18. MalhotraVijay commented on Sep 19, 2018

    @MalhotraVijay

    We are also getting this issue with the helm version v2.10.0 version on Kubernetes version v1.8.2

    Client: &version.Version{SemVer:"v2.10.0", GitCommit:"9ad53aac42165a5fadc6c87be0dea6b115f93090", GitTreeState:"clean"}
    Server: &version.Version{SemVer:"v2.10.0", GitCommit:"9ad53aac42165a5fadc6c87be0dea6b115f93090", GitTreeState:"clean"}

    We have an internal chart, which we intend to upgrade via the CI/CD pipeline using the following command and the upgrade process keeps on waiting.

    helm upgrade <chart_release> <chart_path> --debug --wait

    We then have to kill the process and the chart release history show 'PENDING_UPGRADE' for some unknown amount of time before either it says DEPLOYED during some builds or Upgrade "<chart_release>" failed: timed out waiting for the condition

    Is this solved or are we missing something ?

  19. Brightside56 commented on Oct 3, 2018

    @Brightside56

    I have same issue with install/update with --wait

  20. KIVagant commented on Oct 5, 2018

    @KIVagant

    Same here.

    Client: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
    Server: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
    
    # helm upgrade ... --wait 900 ... shows:
    Error: UPGRADE FAILED: timed out waiting for the condition
    
    ...
    # helm status shows
    LAST DEPLOYED: Fri Oct  5 14:04:23 2018
    NAMESPACE: default
    STATUS: FAILED
    

    But all resources were created.

  21. KIVagant commented on Oct 5, 2018

    @KIVagant

    Looks like this workaround suggested by @tcolgate also works for this issue. I just fixed FAILED release using helm rollback myproject 16 where 16 was "FAILED" release.

    #3208 (comment)

  22. KIVagant commented on Oct 8, 2018

    @KIVagant

    Looks like in my case there was a real problem. One of the pods stuck in Pending state with the error: 0/6 nodes are available: 2 node(s) had taints that the pod didn't tolerate, 4 Insufficient cpu.

    I added one more node and now it works!

    Why it looks like this bug but it isn't? Because previously, when I checked the CI result, K8s has already deployed the pod that was in Pending state at the moment of helm upgrade.

  23. smileusd commented on Dec 18, 2018

    @smileusd

    daemonset have the same problem

  24. lm-xingxing commented on Dec 21, 2018

    @lm-xingxing

    use --debug only(no --wait), to see which resource is pending, maybe it different from chart defined ,that cause pending

  25. Emixam23-FCMS commented on Oct 1, 2020

    @Emixam23-FCMS

    Hey guys, still having the issue, any idea? Currently using helm image 3.2.0

  26. piratf commented on Nov 5, 2021

    @piratf

    Same issue. All pods are running, but helm upgrade still waiting.

    version.BuildInfo{Version:"v3.3.4", GitCommit:"a61ce5633af99708171414353ed49547cf05013d", GitTreeState:"clean", GoVersion:"go1.14.9"}

  27. zhilyaev commented on Nov 9, 2021

    @zhilyaev

    The same problem

  28. castaneai commented on Jan 14, 2022

    @castaneai

    Hi. I got the same problem with minikube.
    The cause was that the type: LoadBalancer resource did not have an External IP ( kubernetes/minikube#4113 ).
    I found the cause because the --debug flag provided me with the following log.

      wait.go:48: [debug] beginning wait for 29 resources with timeout of 5m0s
      ready.go:258: [debug] Service does not have load balancer ingress IP address: agones-system/agones-allocator
      ready.go:258: [debug] Service does not have load balancer ingress IP address: agones-system/agones-allocator
      ready.go:258: [debug] Service does not have load balancer ingress IP address: agones-system/agones-allocator
      ready.go:258: [debug] Service does not have load balancer ingress IP address: agones-system/agones-allocator
      ready.go:258: [debug] Service does not have load balancer ingress IP address: agones-system/agones-allocator
    ...
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions