monocular icon indicating copy to clipboard operation
monocular copied to clipboard

Chart packaged on Windows cannot be used on Linux

Open maciejmaciejewski opened this issue 6 years ago • 6 comments

I have a Chart called DummySpring created for test purposes. It has been packaged on Windows using helm. When I upload my package to monocular running in the k8s cluser it does not properly unpack it. After the upload I can see following error message in the monocular logs.

time="2018-03-01T14:59:30Z" level=info msg="Using cache directory" path="/root/monocular/repo-data"
time="2018-03-01T14:59:30Z" level=info msg="Local cache missing" name=DummySpring version=0.2.0
time="2018-03-01T14:59:30Z" level=info msg="Downloading metadata" dest="/root/monocular/repo-data/DummySpring/0.2.0/chart.tgz"
time="2018-03-01T14:59:30Z" level=info msg="Storing in cache" path="/root/monocular/repo-data/DummySpring/0.2.0/README.md"
time="2018-03-01T14:59:30Z" level=error msg="Error on DownloadAndExtractChartTarball" error="open /tmp/chart495105674/DummySpring/README.md: no such file or directory"

When I logged into the POD and checked the content of the temp directory it turned out that is has not been properly unpacked. Instead of putting files into a directory the tool unpacked them to the root of the temp dir with the names matching Windows relative paths. Listing of the directory shows following content

/tmp/chart495105674 # ls -la
total 48
drwx------    3 root     root          4096 Mar  1 14:59 .
drwxrwxrwt    1 root     root         20480 Mar  1 14:59 ..
drwx------    2 root     root          4096 Mar  1 14:59 DummySpring
-rwxr-xr-x    1 root     root           333 Mar  1 14:59 DummySpring\.helmignore
-rwxr-xr-x    1 root     root           149 Mar  1 14:59 DummySpring\README.md
-rwxr-xr-x    1 root     root          1057 Mar  1 14:59 DummySpring\templates\_helpers.tpl
-rwxr-xr-x    1 root     root          1535 Mar  1 14:59 DummySpring\templates\complete.yaml

I have packed exactly the same chart on Linux and it works properly.

maciejmaciejewski avatar Mar 01 '18 15:03 maciejmaciejewski

Wow interesting, I did not expect that. I assume the Windows package works with Helm CLI correctly?

I don't currently have the bandwidth to fix this issue right now, but would be happy to accept a patch for it.

prydonius avatar Mar 01 '18 15:03 prydonius

@prydonius Thanks for quick answer. The tar.gz file is packaged properly using Helm CLI.

maciejmaciejewski avatar Mar 01 '18 15:03 maciejmaciejewski

@maciejmaciejewski are you able to install the Windows Helm clients package on a Linux Helm client?

prydonius avatar Mar 01 '18 15:03 prydonius

@prydonius yes I am

> helm install DummySpring-0.2.0.tgz
  NAME:   invited-worm
  LAST DEPLOYED: Thu Mar  1 16:57:39 2018
  NAMESPACE: default
  STATUS: DEPLOYED

maciejmaciejewski avatar Mar 01 '18 15:03 maciejmaciejewski

@maciejmaciejewski okay was just wondering if Helm actually fully supported this, seems like it does.

prydonius avatar Mar 01 '18 16:03 prydonius

I have exactly the same problem here :

error

The DownloadAndExtractChartTarball function crashes because the "deflate" task produce this weird files output ...

cabrinoob avatar Mar 09 '18 09:03 cabrinoob