Skip to content

release: not found when I do helm install on a chart with some weird properties #1996

Closed

Description

@iameli

Came across this while doing some mad science on directories that are both Helm charts and Javascript modules. Minimal repro case is here. The end result is that Helm successfully deploys a chart and immediately forgets that it did, like so:

> helm install --name test .
NAME:   test
Error: getting deployed release "test": release: not found

It does actually create the relevant Deployment object, but it doesn't know anything about the test release. I have to manually go in and delete the Deployment with kubectl.

I'm sure the problem is related to the node_modules directory -- it contains a zillion files and directories for all of my Javascript dependencies. Potentially I'm exceeding some hidden limit for files allowed within a Helm chart? Obviously I should be putting node_modules in .helmignore, but presumably Helm should also be doing something more coherent upon this failure case.

Activity

  1. changed the title [-]Silent failure of `helm install` on a chart with some weird properties.[/-] [+]release: not found when I do `helm install` on a chart with some weird properties[/+] on Feb 19, 2017
  2. changed the title [-]release: not found when I do `helm install` on a chart with some weird properties[/-] [+]`release: not found` when I do `helm install` on a chart with some weird properties[/+] on Feb 19, 2017
  3. technosophos commented on Feb 21, 2017

    @technosophos
    Member

    Can you get the output of Tiller's logs using kubectl? Also, if you do kubectl get configmap --namespace kube-system, do you see a config map with that release name (e.g. test)? THat's where it stores its deployment record.

  4. iameli commented on Feb 22, 2017

    @iameli
    ContributorAuthor

    Ah, looks like you got it, Tiller complains that it can't create the ConfigMap:

    2017/02/22 01:58:57 storage.go:133: Getting release history for 'test'
    2017/02/22 01:58:57 release_server.go:913: Executing pre-install hooks for test
    2017/02/22 01:58:57 release_server.go:940: Hooks complete for pre-install test
    2017/02/22 01:58:57 storage.go:133: Getting release history for 'test'
    2017/02/22 01:58:57 release_server.go:913: Executing post-install hooks for test
    2017/02/22 01:58:57 release_server.go:940: Hooks complete for post-install test
    2017/02/22 01:58:57 storage.go:45: Create release "test" (v1) in storage
    2017/02/22 01:58:57 cfgmaps.go:316: configmaps: create: failed to create: ConfigMap "test.v1" is invalid: data: Too long: must have at most 1048576 characters
    2017/02/22 01:58:57 release_server.go:817: warning: Failed to record release "test": ConfigMap "test.v1" is invalid: data: Too long: must have at most 1048576 characters
    2017/02/22 01:58:59 storage.go:133: Getting release history for 'test'
    
  5. technosophos commented on Feb 24, 2017

    @technosophos
    Member

    Ah! So the chart is too large to get stored. IIRC, there's a limit in Kubernetes 1.5 that no resource can be larger than (approximately) 1M. We do gzip the chart, but it probably still pushed beyond that limit.

    EDIT: and you can use .helmignore (like .gitignore) to prevent the Node stuff from getting pushed to Helm, which may fix this for you.

  6. Mario54 commented on Apr 28, 2017

    @Mario54
    Contributor

    Would it be possible to have a better error message for this? I had the same error release: not found, and it took me a while to figure out that the problem was that there was too much data to fit in a ConfigMap.

    I'm not familiar with the design of Helm and Tiller, but maybe there's an easy way for Tiller to return this as a clear error message which Helm would show to the user?

  7. erikbgithub commented on May 22, 2017

    @erikbgithub

    I'd like to +1 the error message part. Ran into the same problem and had to figure out that the issue is a configmap (in my case one that didn't get delete with --purge for whatever reason).

  8. sstarcher commented on Jul 24, 2017

    @sstarcher
    Contributor

    This should be updated to be a bug. When this issue happens the user gets a bad error message and the chart installs get orphaned. If possible it would also be great to catch this prior to any kubernetes objects being installed or even by helm lint. In my specific case my chart is at the root of a git repo so a helm package . shows me that it is packaging up the .git folder in the root of the repo which is why my chart ballooned to over 1M. My fix was of course to add a .helmignore for .git, but I also have to manually clean up all resources created by the failed helm install

    helm install .
    NAME:   ugly-newt
    Error: getting deployed release "ugly-newt": release: "ugly-newt" not found
    
    
    helm delete --purge ugly-newt
    Error: Unable to lock release "ugly-newt": release not found
    
    
    kubectl get pods | grep ugly
    ugly-newt-prometheus-alertmanager-2167339090-2tf56          2/2       Running            0          1m
    ugly-newt-prometheus-kube-state-metrics-2256588538-w98gm    1/1       Running            0          1m
    ugly-newt-prometheus-server-3612114810-flv8f                2/2       Running            0          1m
    
  9. kwilliams057 commented on Oct 2, 2017

    @kwilliams057

    +1 for updating this to a bug.
    I ran into the same problem. The charts were orphaned and i had to manually delete all the resources helm created and couldnt do a helm delete --purge

    [storage/driver] 2017/10/02 15:25:43 create: failed to create: ConfigMap "mangy-hog.v1" is invalid: data: Too long: must have at most 1048576 characters
    [tiller] 2017/10/02 15:25:43 warning: Failed to record release mangy-hog: ConfigMap "mangy-hog.v1" is invalid: data: Too long: must have at most 1048576 characters
    
    -> % kubectl get statefulset
    NAME                                    DESIRED   CURRENT   AGE
    hardy-camel-mongodb-replicaset          3         1         16m
    innocent-pronghorn-mongodb-replicaset   3         1         21m
    loping-boxer-mongodb-replicaset         3         1         19m
    mangy-hog-mongodb-replicaset            3         1         9m
    mongo-log-rec-mongodb-replicaset        3         1         23m
    veering-whippet-mongodb-replicaset      3         1         10m
    volted-dragonfly-mongodb-replicaset     3         1         15m
  10. davidovich commented on Oct 19, 2017

    @davidovich

    This also happens if your chart is at the root of the repo. Seems helm is packaging the .git repository. With the current error message, this is very hard to diagnose.

    Adding .git and other non chart related directories and files to the .helmignore file fixes the problem.

    When you get bit, all the resources are left dangling, which violates the helm transaction.

  11. thoyt commented on Nov 3, 2017

    @thoyt

    I ran into this as well and it took quite a while to realize it's because I had a scratch file in the chart directory. A better error message would be greatly appreciated.

  12. 17 remaining items

  13. rcorre commented on Jul 5, 2018

    @rcorre

    /remove-lifecycle stale

  14. macropin commented on Sep 7, 2018

    @macropin

    As per https://github.com/confluentinc/cp-helm-charts/issues/135 I believe that this is bug should be addressed:

    Helm fails on install / upgrade. Tiller reports Failed to record release xxxx: ConfigMap "xxxx.v1" is invalid: data: Too long: must have at most 1048576 characters when in fact the configmap is fine. The error is elsewhere with the chart containing nested charts due to a publishing error.

    Helm should handle this more elegantly.

  15. JarleB commented on Sep 7, 2018

    @JarleB

    +1

    Maybe helm can have an option leave out the contents of the charts' configmaps when storing the tiller configmap (for managing the chart). That way helm would still be able to know about all the properties/metadata in order to manage the chart but without the added storage need for cm-contentes. A nice tradeoff for people with many and large configmaps in the chart.

  16. chilianyi commented on Sep 21, 2018

    @chilianyi

    It happened on my environment too.

    root@i-lcsolq8c:/opt/helm# helm install nginx --namespace=alex-namespace
    NAME:   geared-quail
    Error: getting deployed release "geared-quail": release: "geared-quail" not found
    root@i-lcsolq8c:/opt/helm# kubectl get pod -n alex-namespace
    NAME                                  READY     STATUS    RESTARTS   AGE
    geared-quail-nginx-68c8dcd4bc-vjqrx   1/1       Running   0          13s
    k8s-test-alex-nginx-6d7fdf748-zjncs   1/1       Running   0          48m
    test-alex-nginx-d6757c477-6qzfb       1/1       Running   0          1h
    root@i-lcsolq8c:/opt/helm# helm ls
    NAME        	REVISION	UPDATED                 	STATUS  	CHART                	NAMESPACE                 
    cert-manager	1       	Sun Aug 26 03:29:30 2018	DEPLOYED	cert-manager-v0.4.0  	kube-system               
    for-test    	1       	Mon Aug  6 03:32:06 2018	DEPLOYED	neo4j-0.7.2          	kubesphere-controls-system
    test        	1       	Tue Jul 31 03:32:46 2018	DEPLOYED	keycloak-2.0.0       	default                   
    test-libr   	1       	Tue Aug 14 09:09:48 2018	FAILED  	home-assistant-0.1.45	lab                       
    test-libr1  	4       	Fri Aug 24 06:33:16 2018	FAILED  	hlf-peer-1.0.8       	lab                       
    wx1         	2       	Fri Aug 24 06:29:23 2018	DEPLOYED	wordpress-2.1.9      	wx                        
    wx2         	1       	Tue Aug 21 09:46:46 2018	FAILED  	wordpress-2.1.9      	wx
    

    The log in tiller is:

    [tiller] 2018/09/21 07:58:50 performing install for 
    [tiller] 2018/09/21 07:58:50 executing 0 pre-install hooks for geared-quail
    [tiller] 2018/09/21 07:58:50 hooks complete for pre-install geared-quail
    [storage] 2018/09/21 07:58:50 getting release history for ""
    [storage] 2018/09/21 07:58:50 creating release "geared-quail.v1"
    [storage/driver] 2018/09/21 07:58:51 create: failed to create: configmaps "geared-quail.v1" is forbidden: exceeded quota: quota, requested: count/configmaps=1, used: count/configmaps=80, limited: count/configmaps=10
    [tiller] 2018/09/21 07:58:51 warning: Failed to record release geared-quail: configmaps "geared-quail.v1" is forbidden: exceeded quota: quota, requested: count/configmaps=1, used: count/configmaps=80, limited: count/configmaps=10
    

    Because of the quota of configmap is not enough

    root@i-lcsolq8c:/opt/helm# kubectl describe quota -n kube-system
    Name:                                  quota
    Namespace:                             kube-system
    Resource                               Used            Hard
    --------                               ----            ----
    count/configmaps                       80              10
    count/daemonsets.apps                  4               30
    count/deployments.apps                 8               50
    count/ingresses.extensions             0               40
    count/persistentvolumeclaims           0               40
    count/pods                             34              200
    count/roles.rbac.authorization.k8s.io  8               100
    count/secrets                          46              10
    count/services                         9               50
    count/statefulsets.apps                2               30
    limits.cpu                             388m            20
    limits.memory                          1881153536001m  20Gi
    requests.cpu                           4303m           20
    requests.memory                        1398808576001m  20Gi
    services.loadbalancers                 0               20
    
    
  17. davidxjohnson commented on Oct 15, 2018

    @davidxjohnson

    I realize this is an old post and closed issue, but I wanted to share what I discovered as the cause of the over-sized configmap. Each time I issued a helm package ./ command, any previous versions of the package (*.tzg files) was included in the current one. The tgz package file kept growing, exponentially. The cure was to add *.tgz to the .helmignore file.

  18. mumubin commented on Dec 4, 2018

    @mumubin

    maybe name issue,
    [tiller] 2018/12/04 06:15:25 warning: Failed to record release k8s_service: ConfigMap "k8s_service.v1" is invalid: metadata.name: Invalid value: "k8s_service.v1": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')
    [kube] 2018/12/04 06:15:25 building resources from manifest

  19. added
    good first issue
    and removed on Mar 4, 2019
  20. fateh001 commented on Apr 25, 2023

    @fateh001

    $ helm upgrade --install my-release http://utilities.hcldevopscoe.com:30323/repository/myhelmrepo/deploy-0.1.0.tgz --set image.repository=http://docker.gitops.hcldevopscoe.com/docker-repo/my-docker-image,image.tag=${CI_COMMIT_SHORT_SHA}
    WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /builds/fmohamm/java-container-based-deploymet.tmp/KUBECONFIG_FILE
    WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /builds/fmohamm/java-container-based-deploymet.tmp/KUBECONFIG_FILE
    Release "my-release" does not exist. Installing it now.
    Error: failed to fetch http://utilities.hcldevopscoe.com:30323/repository/myhelmrepo/deploy-0.1.0.tgz : 404 Not Found

    Does anyone aware of this issue, I need help on this. Thanks!

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

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions