Skip to content

--atomic upgrades fails due to timeout #5377

Closed

Description

@tobylo

After upgrade to 2.13.0, both client and server, I instantly jumped to do an --atomic upgrade, but it fails due to timeout.

Our build agents (Azure DevOps Server agents) ran two parallell upgrades to two different clusters (from the same machine), they both tried creating tunnels using different ports, both failed.
Tried only doing one deploy to one cluster, same issue.

Tried removing --atomic, then the upgrade works as usual.

Error log:

helm upgrade --namespace XXXX --install --force --values path/values.yaml --debug --atomic release-name /path/package.tgz
Error: timed out waiting for the condition
[debug] Created tunnel using local port: '34551'

[debug] SERVER: "127.0.0.1:34551"

UPGRADE FAILED
ROLLING BACK
Error: timed out waiting for the condition

Output of helm version:

Client: &version.Version{SemVer:"v2.13.0", GitCommit:"79d07943b03aea2b76c12644b4b54733bc5958d6", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.13.0", GitCommit:"79d07943b03aea2b76c12644b4b54733bc5958d6", GitTreeState:"clean"}

Output of kubectl version:

{
"clientVersion": {
"major": "1",
"minor": "10",
"gitVersion": "v1.10.3",
"gitCommit": "2bba0127d85d5a46ab4b778548be28623b32d0b0",
"gitTreeState": "clean",
"buildDate": "2018-05-21T09:17:39Z",
"goVersion": "go1.9.3",
"compiler": "gc",
"platform": "linux/amd64"
},
"serverVersion": {
"major": "1",
"minor": "12",
"gitVersion": "v1.12.4",
"gitCommit": "f49fa022dbe63faafd0da106ef7e05a29721d3f1",
"gitTreeState": "clean",
"buildDate": "2018-12-14T06:59:37Z",
"goVersion": "go1.10.4",
"compiler": "gc",
"platform": "linux/amd64"
}
}

Cloud Provider/Platform (AKS, GKE, Minikube etc.):

Deploy to both AKS and onprem fails

Activity

  1. tobylo commented on Feb 28, 2019

    @tobylo
    Author

    In what way is the tunnel opened, is it proxied via the kubectl client? Thinking about firewall policies which could be the case regarding the on-prem cluster. If that was the case, I would have assumed the AKS deploy to work though.

  2. jlegrone commented on Mar 2, 2019

    @jlegrone
    Member

    @tobylo do you have a publicly available chart which can be used to reproduce this issue?

    It's possible that you're seeing a difference in behavior after adding --atomic because doing so also sets --wait to true. To test this, please see if you get the same behavior when removing the atomic flag and adding wait. If this errors in the same way, then setting --timeout to something higher than the default 300 should fix your issue.

  3. bacongobbler commented on Mar 4, 2019

    @bacongobbler
    Member

    I had a look at #5143 and have no idea why the wait flag had to be enabled in the first place. I'm going to PR a change to the atomic flag to remove that behaviour. Users can opt into the --wait flag with helm upgrade --atomic --wait if they so choose, but there's no reason why it's required for the --atomic flag to work.

  4. bacongobbler commented on Mar 5, 2019

    @bacongobbler
    Member

    @tobylo if you wouldn't mind testing #5395 and verify if that works for you, that'd be great. :)

  5. tobylo commented on Mar 5, 2019

    @tobylo
    Author

    @bacongobbler just compiled it, will try it out tomorrow and let you know!

  6. tobylo commented on Mar 14, 2019

    @tobylo
    Author

    I have only been able to test your version on my local dev machine, --atomic works, but so it is using the 2.13 version.

    While trying to test ways of getting the test version running on the build agents, I upgraded kubectl to 1.13.4 and tried --atomic with a higher --timeout, and now atomic upgrades work with v2.13 as well. I would assume it's due to the kubectl upgrade and not the --timeout, because the helm deploy does work as fast as without.

  7. bacongobbler commented on Mar 14, 2019

    @bacongobbler
    Member

    I would assume it's due to the kubectl upgrade and not the --timeout,

    I'm pretty sure it's more likely due to the increased timeout. Because helm upgrade --atomic also enables the --wait flag, Helm keeps the connection open until all of the replicas in your deployment have returned to a ready state or the specified timeout has been reached. By increasing the timeout, you're giving helm more time to wait for the pods to come alive. I don't believe there was any significant change made between 1.12.4 and 1.13.4 that would've changed the wait logic in a significant way, but I could be wrong.

    Either way, glad you have a workaround.

  8. odoo-sh commented on Aug 13, 2025

    @odoo-sh

    open /bin/openreplay

    uncomment HELM_OPTONS so it looks like below.

    HELM_OPTIONS="--timeout=30m"

    and execute

    openreplay -i your domain_name

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