From 33ace505cc95cf63b2589e66e19d3c288a0a7b92 Mon Sep 17 00:00:00 2001 From: Dmitry Monakhov Date: Thu, 2 Mar 2017 04:40:02 +0300 Subject: [PATCH] install: Return more user-friendly response on eexists Most newcomers hit helm's 'feature' there deleted instalations are not really deleted. Use-case # helm install --name gitlab-ce-1 ./stable/gitlab-ce # helm delete gitlab-ce-1 # helm list # helm install --name gitlab-ce-1 ./stable/gitlab-ce Error: a release named "gitlab-ce-1" already exists There is a lot duplicated bugs in bugzilla which simply explains that packages should be deleted with --pure flag. But such bugs appeared again and again because this behavior is not obvious. Let's help user to figure out what happens ASAP. --- pkg/tiller/release_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index 8e9f20c32..c8af739d7 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -588,7 +588,7 @@ func (s *ReleaseServer) uniqName(start string, reuse bool) (string, error) { return "", errors.New("cannot re-use a name that is still in use") } - return "", fmt.Errorf("a release named %q already exists", start) + return "", fmt.Errorf("a release named %q already exists.\nPlease run: helm ls --all %q; helm del --help", start, start) } maxTries := 5