rancher: [helm] [helm-controller] failed with : helm template failed. Error: stat template-dir: no such file or directory

What kind of request is this (question/bug/enhancement/feature request): bug

Steps to reproduce (least amount of steps as possible):

  1. add helm repo via rancher UI repo: https://raw.githubusercontent.com/jasonsoft/helm/master/ name: jasonsoft level: global
  2. lauch app from category. Search “whitemos” and click “view detail” button
  3. just click “lauch” button

Result: got an error message on the page. Helm template failed. Error: stat template-dir: no such file or directory : exit status 1

Other details that may be helpful: If we use helm cli to install the package via console, it works.

error message from rancher

2019/03/03 06:19:02 [ERROR] AppController p-xrqw7/whitemos-md4q2 [helm-controller] failed with : helm template failed. Error: stat template-dir: no such file or directory

Environment information

  • Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI):
  • Installation option (single install/HA):

Rancher/Rancher: v2.2.0-rc2, single node

Cluster information

  • Cluster type (Hosted/Infrastructure Provider/Custom/Imported):
  • Machine type (cloud/VM/metal) and specifications (CPU/memory):
  • Kubernetes version (use kubectl version):

Cluster type: imported ( cluster created via kubeadm) Machine type: vm

Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.6", GitCommit:"ab91afd7062d4240e95e51ac00a18bd58fddd365", GitTreeState:"clean", BuildDate:"2019-02-26T12:59:46Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.6", GitCommit:"ab91afd7062d4240e95e51ac00a18bd58fddd365", GitTreeState:"clean", BuildDate:"2019-02-26T12:49:28Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}

  • Docker version (use docker version):
Client:
 Version:           18.06.3-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        d7080c1
 Built:             Wed Feb 20 02:26:51 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.3-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       d7080c1
  Built:            Wed Feb 20 02:28:17 2019
  OS/Arch:          linux/amd64
  Experimental:     false

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 31
  • Comments: 42 (5 by maintainers)

Commits related to this issue

Most upvoted comments

This issue seems to occur when the url to the packaged chart is relative. A workaround here is to pass --url in when building the index.yaml.

Example to get it working on 10.0.0.100:

docker run --rm -it \
  -p 8080:8080 \
  -e STORAGE=local \
  -e STORAGE_LOCAL_ROOTDIR=/charts \
  chartmuseum/chartmuseum:latest --chart-url http://10.0.0.100:8080

Tested with rancher-2.2.3.

I am getting a similar thing Wait helm template failed. Error: stat /cert-manager: no such file or directory : exit status 1 from https://charts.jetstack.io

Wait helm template failed. Error: stat /harbor: no such file or directory : exit status 1 from https://helm.goharbor.io

etc…

same issue in v2.2.2

2019/04/17 22:11:24 [ERROR] AppController p-mqwf9/external-dns [helm-controller] failed with : helm template failed. Error: stat template-dir: no such file or directory

mine is 2.2.10, still seeing this, what should i do?

I still see this on 2.2.9 with cert-manager from jetstack

After upgrading to Rancher v2.3.2 it still does not work. But the error message has changed to: Wait helm template failed. Error: stat /cert-manager: no such file or directory : exit status 1

The bug fix is validated in Rancher:master-head d7b425da7

Steps: the same as my previous comment

Results: The app is deployed successfully and there are no error messages in both Racnehr UI and logs

Screen Shot 2019-08-29 at 2 18 05 PM

This issue seems to occur when the url to the packaged chart is relative. A workaround here is to pass --url in when building the index.yaml.

Can confirm it’s still an issue with the cert-manager chart from Jetstack, where the URL in index.yaml looks like this:

    urls:
      - charts/cert-manager-v0.12.0.tgz

same v2.2.2 "message": "helm template failed. Error: stat template-dir: no such file or directory\n: exit status 1",

Experiencing this issue as of today running rancher 2.2.8

Steps to test

  1. use a chart with relative paths such as https://helm.goharbor.io (you can ensure it has a relative path by going to https://helm.goharbor.io/index.yaml and inspecting that for non-FQDNs in the url section.
  2. launch app from catalog chosen above
  3. Install the chart

By any chance does your catalog URL have a trailing / In the post you mentioned

https://raw.githubusercontent.com/jasonsoft/helm/master/

Can you try with the repo url as

https://raw.githubusercontent.com/jasonsoft/helm/master

That worked for me. When I removed the trailing / my apps were able to deploy

this is the same issue related to the https://github.com/rancher/rancher/issues/14905, as if you check the index.yaml file of the charts repo, you will find the url path is a relative path, should be fixed in 2.3. image

Same issue with 2.2.0 (latest). Is there a way to remove the failed deployment?