Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm rollback results in "<application-name> has no deployed releases" error #9548

Closed
balazzii opened this issue Mar 30, 2021 · 4 comments
Closed

Comments

@balazzii
Copy link

Output of helm version:
version.BuildInfo{Version:"v3.5.3", GitCommit:"041ce5a2c17a58be0fcd5f5e16fb3e7e95fea622", GitTreeState:"dirty", GoVersion:"go1.15.8"}

Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-18T01:10:43Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.6", GitCommit:"c7c4f6ce84bf8535a782b67465807651a4bd649b", GitTreeState:"clean", BuildDate:"2021-01-18T09:49:05Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}

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

I have prepared helm chart for my application and sometimes helm releases get stuck in Pending-Upgrade Status while performing "helm upgrade -i ". I found the workaround mentioned in the below issue:
#7476
The workaround is to do a helm rollback.

But I get the below error sometimes while performing a helm rollback.
Error: has no deployed releases

I assumed that this error may occur because the helm release status is "Pending-Upgrade" and none of the releases are in deployed state. But what's unclear here is why does the helm rollback succeed sometimes.

It would be great if someone could help me to troubleshoot the following:

  1. Helm release status stuck in "Pending-Upgrade" state.
  2. Helm rollback fails and displays " has no deployed releases".
@mattfarina
Copy link
Collaborator

These are good questions.

The first thing you can do is to use the flags -v 10 --debug. This will tell and the underlying Kubernetes libraries (used to communicate to the cluster) to report debugging information. In that information you may see more detail about what's going on.

In Helm you'll find a general flow where a release record is created saying that an action (e.g., upgrade) is pending, then the action is performed (in your case upgrade), and then the record is updated to say it was completed. The pending stuck state is because the upgrade itself is having issues. That part of the reason I suggested the two debugging flags. So you can try to see where it would be getting stuck.

The no deployed releases error is because Helm tried to look up the previous deployed release and did not find one. You can find the code here.

@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Jun 29, 2021
@MikaelElkiaer
Copy link

@balazzii Did you ever find a solution for this?

@github-actions github-actions bot removed the Stale label Jul 1, 2021
@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants