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 upgrade --install fails with "unsupported format " #6718

Closed
mrtndwrd opened this issue Oct 21, 2019 · 25 comments · Fixed by #6722
Closed

helm upgrade --install fails with "unsupported format " #6718

mrtndwrd opened this issue Oct 21, 2019 · 25 comments · Fixed by #6722
Assignees
Labels

Comments

@mrtndwrd
Copy link

@mrtndwrd mrtndwrd commented Oct 21, 2019

Output of helm version:

# helm version
Client: &version.Version{SemVer:"v2.15.0", GitCommit:"c2440264ca6c078a06e088a838b0476d2fc14750", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.15.0", GitCommit:"c2440264ca6c078a06e088a838b0476d2fc14750", GitTreeState:"clean"}

Output of kubectl version:

# kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-17T17:16:09Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:36:19Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

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

rke on VPS


When I run the following command, I get the following output:

:~/.helm# /snap/bin/helm --debug upgrade --install --reset-values oas-test-cert-manager jetstack/cert-manager --version 0.9.1 --namespace cert-manager --values /tmp/values300582802
[debug] Created tunnel using local port: '39435'

[debug] SERVER: "127.0.0.1:39435"

[debug] Fetched jetstack/cert-manager to /root/.helm/cache/archive/cert-manager-v0.9.1.tgz

Release "oas-test-cert-manager" does not exist. Installing it now.
[debug] CHART PATH: /root/.helm/cache/archive/cert-manager-v0.9.1.tgz

Error: unsupported format 

The same is happening to me with other charts. I can't really add anything to this issue description, because the error I get is super vague... It seems to be coming from:

./cmd/helm/printer.go:120: return fmt.Errorf("unsupported format %s", format)

@hickeyma

This comment has been minimized.

Copy link
Contributor

@hickeyma hickeyma commented Oct 21, 2019

@mrtndwrd Do you mind adding the following flags to the command and show the output: --debug --dry-run ?

@MikeBlomm

This comment has been minimized.

Copy link

@MikeBlomm MikeBlomm commented Oct 21, 2019

I am experiencing the same error, only seems to happen when there is no previous release installed. Normal upgrading a release seems to go fine.

Just updated to Helm version 2.15.0 on GKE.

@mrtndwrd

This comment has been minimized.

Copy link
Author

@mrtndwrd mrtndwrd commented Oct 21, 2019

I had --debug before the upgrade command, 🤔.

Here's the --debug --dry-run output:

# /snap/bin/helm upgrade --debug --dry-run --install --reset-values oas-test-cert-manager jetstack/cert-manager --version 0.9.1 --namespace cert-manager --values /tmp/values300582802
[debug] Created tunnel using local port: '33623'

[debug] SERVER: "127.0.0.1:33623"

[debug] Fetched jetstack/cert-manager to /root/.helm/cache/archive/cert-manager-v0.9.1.tgz

Release "oas-test-cert-manager" does not exist. Installing it now.
[debug] CHART PATH: /root/.helm/cache/archive/cert-manager-v0.9.1.tgz

Edit: accidentally pasted output of the working version.

@mattcamp

This comment has been minimized.

Copy link

@mattcamp mattcamp commented Oct 21, 2019

Same problem here...

$ helm upgrade --debug --install marketplace-proxies-dev-marketplace-client-proxy --namespace marketplace-proxies-dev --set replicaCount=2 marketplace-client-proxy
[debug] Created tunnel using local port: '62401'

[debug] SERVER: "127.0.0.1:62401"

Release "marketplace-proxies-dev-marketplace-client-proxy" does not exist. Installing it now.
[debug] CHART PATH: /tmp/marketplace-client-proxy

Error: unsupported format
@mattcamp

This comment has been minimized.

Copy link

@mattcamp mattcamp commented Oct 21, 2019

Also, note that doing a helm install works fine... it's just when using helm upgrade --install that it errors.

@MikeBlomm

This comment has been minimized.

Copy link

@MikeBlomm MikeBlomm commented Oct 21, 2019

I ended up downgrading helm and tiller back to version 2.14.3. Seems like the problem is only affecting the current 2.15.0 version.

I downgraded my client first, then ran helm init --force-upgrade --upgrade to also downgrade tiller.

@hickeyma hickeyma added bug v2.x and removed question/support labels Oct 21, 2019
@hickeyma

This comment has been minimized.

Copy link
Contributor

@hickeyma hickeyma commented Oct 21, 2019

Verified with a scaffold chart as follows:

$ helm create chrt-6718
Creating chrt-6718

$ helm upgrade --install chrt-6718 chrt-6718/
Release "chrt-6718" does not exist. Installing it now.
Error: unsupported format 
@hickeyma

This comment has been minimized.

Copy link
Contributor

@hickeyma hickeyma commented Oct 21, 2019

It does however deploy as expected:

$ helm ls
NAME     	REVISION	UPDATED                 	STATUS  	CHART          	APP VERSION	NAMESPACE
chrt-6718	1       	Mon Oct 21 16:10:13 2019	DEPLOYED	chrt-6718-0.1.0	1.0        	default  

$ kubectl get all --all-namespaces | grep "chrt-6718"
default       pod/chrt-6718-849d685fb8-qxlnv              1/1     Running   0          2m34s
default       service/chrt-6718              ClusterIP   10.110.216.14   <none>        80/TCP                   2m34s
default       deployment.apps/chrt-6718              1/1     1            1           2m34s
default       replicaset.apps/chrt-6718-849d685fb8              1         1         1       2m34s
@hickeyma

This comment has been minimized.

Copy link
Contributor

@hickeyma hickeyma commented Oct 21, 2019

The error is because there is no format defined for the output of the command. It should default to table.

A workaround: If you specify the output using --output flag then the output is shown:

$ helm upgrade --install chrt-6718 chrt-6718/ -o table
Release "chrt-6718" has been upgraded.
LAST DEPLOYED: Mon Oct 21 16:15:52 2019
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1/Deployment
NAME       READY  UP-TO-DATE  AVAILABLE  AGE
chrt-6718  1/1    1           1          5m39s

==> v1/Pod(related)
NAME                        READY  STATUS   RESTARTS  AGE
chrt-6718-849d685fb8-qxlnv  1/1    Running  0         5m39s

==> v1/Service
NAME       TYPE       CLUSTER-IP     EXTERNAL-IP  PORT(S)  AGE
chrt-6718  ClusterIP  10.110.216.14  <none>       80/TCP   5m39s

==> v1/ServiceAccount
NAME       SECRETS  AGE
chrt-6718  1        5m39s


NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=chrt-6718,app.kubernetes.io/instance=chrt-6718" -o jsonpath="{.items[0].metadata.name}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl port-forward $POD_NAME 8080:80
@hickeyma

This comment has been minimized.

Copy link
Contributor

@hickeyma hickeyma commented Oct 21, 2019

I will push a PR for this shortly..

@hickeyma hickeyma self-assigned this Oct 21, 2019
@sadovnikov

This comment has been minimized.

Copy link

@sadovnikov sadovnikov commented Oct 21, 2019

@hickeyma, I tried adding --output=table to the command, but it didn't help.
In your sample I see Release "chrt-6718" has been upgraded. Was it the first time installation of the release?

@hickeyma

This comment has been minimized.

Copy link
Contributor

@hickeyma hickeyma commented Oct 21, 2019

@sadovnikov yes, it seems to be it will work on the upgrade and not on the initial install

@sadovnikov

This comment has been minimized.

Copy link

@sadovnikov sadovnikov commented Oct 21, 2019

I'd like to add that this error does not actually prevent the release from getting DEPLOYED. However, it does brake the build because helm return non-zero code.

@davidcodesido

This comment has been minimized.

Copy link

@davidcodesido davidcodesido commented Oct 21, 2019

I can confirm that I'm having the same behaviour. Upgrade works fine but install via helm upgrade --install fails as described. When run with --output=table --debug --dry-run it doesn't output anything useful. When I run it without the --dry-run but keeping the --debug --output=table It fails with Error: unsupported format.

It installs indeed anyway but it is breaking all our pipelines cause it returns this error.

@disparo13

This comment has been minimized.

Copy link

@disparo13 disparo13 commented Oct 21, 2019

Same thing.

@hickeyma

This comment has been minimized.

Copy link
Contributor

@hickeyma hickeyma commented Oct 21, 2019

PR #6722 pushed for the fix.

@hickeyma

This comment has been minimized.

Copy link
Contributor

@hickeyma hickeyma commented Oct 21, 2019

Fix now merged. Can you try it out and see if it works as expected?

@varac

This comment has been minimized.

Copy link

@varac varac commented Oct 22, 2019

@hickeyma Great! Will there be a hotfix release soon ?

@hickeyma

This comment has been minimized.

Copy link
Contributor

@hickeyma hickeyma commented Oct 22, 2019

@varac Try building from latest Helm v2 branch: dev-v2. No timeline yet. We are currently working on Helm 3 release.

lazypower added a commit to vapor-ware/deployment-tools that referenced this issue Oct 22, 2019
- Related to: helm/helm#6718

Downgrading to 2.14.3 and forcing tillers to downgrade will allow fresh
installs without needing to refactor all the consuming code that invokes
`helm upgrade --install`
lazypower added a commit to vapor-ware/deployment-tools that referenced this issue Oct 22, 2019
- Related to: helm/helm#6718

Downgrading to 2.14.3 and forcing tillers to downgrade will allow fresh
installs without needing to refactor all the consuming code that invokes
`helm upgrade --install`
@benc-uk

This comment has been minimized.

Copy link

@benc-uk benc-uk commented Oct 22, 2019

Sorry to say 2.15.0 is unusable in this state :(
Is the recommendation just to rollback and use 2.14.3 ?

@bacongobbler

This comment has been minimized.

Copy link
Member

@bacongobbler bacongobbler commented Oct 22, 2019

You have a few options available:

  1. use helm install instead of helm upgrade --install
  2. compile Helm from the dev-v2 branch as @hickeyma mentioned above
  3. revert to Helm 2.14.3

The error only occurs when you invoke helm upgrade --install on the first release. Once the first release is created, this error does not persist and you can use the --install flag (though it has no effect after the initial install).

@bclouser

This comment has been minimized.

Copy link

@bclouser bclouser commented Oct 22, 2019

@hickeyma I built from dev-v2 yesterday and so far it works well. :) I posted the helm binary for my team so we are unblocked. Thanks for the quick fix!

Building was easy... Although i already had a working go environment on my machine.

@hickeyma

This comment has been minimized.

Copy link
Contributor

@hickeyma hickeyma commented Oct 23, 2019

Helm 2.15.1 now released which contains the fix. Release notes are here: https://github.com/helm/helm/releases/tag/v2.15.1

@shreychen

This comment has been minimized.

Copy link

@shreychen shreychen commented Oct 23, 2019

The issue is gone after upgrade helm to v2.15.1

jmlrt added a commit to jmlrt/helm-charts that referenced this issue Oct 23, 2019
This fix a bug on helm upgrade (helm/helm#6718)
@alice-0-kim

This comment has been minimized.

Copy link

@alice-0-kim alice-0-kim commented Nov 4, 2019

The issue is gone after upgrade helm to v.2.15.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.