Skip to content

Helm doesn't cleanup on unsuccessful deployments #3338

Closed

Description

@nmiculinic

After encountering an error during install/upgrade helm doesn't clean after itself (that is operation isn't atomic), which forces me to clean manually each time during testing. Also, that deployment name isn't registered, thus I cannot use helm delete --purge <name>

~ helm version 
Client: &version.Version{SemVer:"v2.7.2", GitCommit:"8478fb4fc723885b155c924d1c8c410b7a9444e6", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.7.2", GitCommit:"8478fb4fc723885b155c924d1c8c410b7a9444e6", GitTreeState:"clean"}

Activity

  1. nmiculinic commented on Jan 12, 2018

    @nmiculinic
    ContributorAuthor

    Also this is related to following bug..if the release name has _ in it, things break. (e.g. sss_ss breaks )

  2. antoniaklja commented on Jan 12, 2018

    @antoniaklja

    Would be nice to make helm install/upgrade transactional for entire chart.
    Maybe even --rollback parameter.

    What do you think?

  3. fejta-bot commented on Apr 12, 2018

    @fejta-bot

    Issues go stale after 90d of inactivity.
    Mark the issue as fresh with /remove-lifecycle stale.
    Stale issues rot after an additional 30d of inactivity and eventually close.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /lifecycle stale

  4. nmiculinic commented on Apr 13, 2018

    @nmiculinic
    ContributorAuthor

    /remove-lifecycle stale

    Yes, it would be nice. The most common case when an update fails is when cluster IP is changed to NodePort or things like that in services. ((IIRC)). The usual solution is to perform rollback with --force

  5. dpepper commented on May 3, 2018

    @dpepper

    I hit this error frequently. An install fails and then I make some changes to my config and try to install again but hit errors complaining about how many pods/configmaps etc already exist. When you run helm list it doesn't list any failed or successful deployments so then I have to go and cleanup everything manually. If an install fails it should definitely rollback the changes it has already made not leave a half installed helm chart.

  6. jibinjohnbabu commented on Jul 25, 2018

    @jibinjohnbabu

    This issue is frustrating, Why do helm charts gets installed partially , when the whole chart isn't perfect? Any work around commands for this?

    ERR : Error: release t1 failed: storageclasses.storage.k8s.io "xxxxx" already exists

  7. ysaakpr commented on Jul 26, 2018

    @ysaakpr

    this is horrible....getting pissed off...most of the time i have delete and re install...thats not a trivial solution. Anyone have any other approach

  8. jibinjohnbabu commented on Jul 26, 2018

    @jibinjohnbabu

    @ysaakpr

    1. helm install testchart/ --name xyz --> installs with a release name

    if you want to make changes to the release use,

    1. helm upgrade xyz testchart/ --> upgrades with the recent changes only

    also , below command is useful to delete the full release itself
    3. helm del --purge xyz

    --Thanks

  9. dpepper commented on Jul 26, 2018

    @dpepper

    @jibinjohnbabu that doesn't work when helm doesn't appear in the releases and leaves the cluster in an unclean state. Which is what this whole git issue is about.

  10. dpepper commented on Jul 26, 2018

    @dpepper

    @bacongobbler why is this labelled as a feature? It's a bug.

  11. desaintmartin commented on Jan 10, 2019

    @desaintmartin

    Although I am affected by this bug, I can run helm delete --purge $name. Is that related to this _ thing?

  12. self-assigned this
    on Jan 10, 2019
  13. 4 remaining items

  14. added 4 commits that reference this issue on Jan 23, 2019
  15. added a commit that references this issue on Jan 28, 2019
    240e539
  16. cleac commented on Jan 29, 2019

    @cleac

    Well, as far as I understand things, this feature must be ported to dev-v3 branch. Should it be done related to different issue? Or maybe this one shouls be reopened?

  17. thomastaylor312 commented on Jan 29, 2019

    @thomastaylor312
    Contributor

    @cleac I think this was more targeted to Helm 2. @adamreese should we put something on the project board?

    In the meantime, feel free to work on the port if you were planning on doing so, we won't block opening a PR just because there isn't an issue for it 🙂

  18. added 2 commits that reference this issue on Mar 21, 2019
  19. IdanAdar commented on Apr 11, 2019

    @IdanAdar

    Can a new status code be added to programmatically know that a chart was reverted? Reporting “1” as before does not provide proper understandings of what that has happened.

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions