Skip to content

Failed rollback left in PENDING_ROLLBACK state #3828

Closed

Description

@stuartleeks

Output of helm version:

Client: &version.Version{SemVer:“v2.8.2”, GitCommit:“a80231648a1473929271764b920a8e346f6de844", GitTreeState:“clean”}
Server: &version.Version{SemVer:“v2.8.2", GitCommit:“a80231648a1473929271764b920a8e346f6de844”, GitTreeState:“clean”}

Output of kubectl version:

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

Description

Whilst investigating #3675 I noticed that a failed rollback is left in the PENDING_ROLLBACK state (see #3675 for repro steps):

$ ~/go/src/k8s.io/helm/bin/helm history test
REVISION	UPDATED                 	STATUS          	CHART     	DESCRIPTION     
1       	Thu Mar 15 10:21:51 2018	SUPERSEDED      	test-0.1.0	Install complete
2       	Thu Mar 15 10:23:52 2018	SUPERSEDED      	test-0.1.0	Upgrade complete
3       	Thu Mar 15 10:25:14 2018	PENDING_ROLLBACK	test-0.1.0	Rollback to 1   

Also, the tiller logs show:

[tiller] 2018/03/15 10:25:15 warning: Failed to record release test: release: "test.v3" already exists

In the error handling in performRollback it passes false to the recordRelease function. Looking at the code for recordRelease the boolean parameter is reuse, i.e. true to update an existing record and false to create a new record. In prepareRollback it creates a new release, so the error handling in performRollback needs updating to update the record created in prepareRollback.

Addressing this doesn't fix #3675, but it does at least mark the rollback as failing as per the intention of the code (and remove the error from the tiller logs).

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

Metadata

Metadata

Assignees

No one assigned

    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