TsuyoshiUshio / KubernetesTask

Kubernetes Task for Visual Studio Team Services
34 stars 14 forks source link

Fails to download helm since Dec 03 2017 #32

Open oivindoh opened 6 years ago

oivindoh commented 6 years ago

Since yesterday we've had a bunch of failed builds, apparently because the helm downloader stage is failing on an unhandled promise rejection.

The helm version we've been targeting is 2.6.0, which is the one we started seeing the failure on yesterday. Attempting to specify 2.7.0 leads to the same - these versions appear to be available on the URI found in this project.

Here's a VSTS build log

2017-12-04T08:03:17.2709670Z ##[section]Starting: Download helm, kubectl
2017-12-04T08:03:17.4222800Z ==============================================================================
2017-12-04T08:03:17.4556950Z Task         : k8s downloader
2017-12-04T08:03:17.4889170Z Description  : Download the kubectl, istioctl, and helm. Also It enable to use these command.
2017-12-04T08:03:17.5228590Z Version      : 1.0.3
2017-12-04T08:03:17.5565870Z Author       : Tsuyoshi Ushio
2017-12-04T08:03:17.5900520Z Help         : See [Kubernetes task](https://github.com/TsuyoshiUshio/KubernetesTask)
2017-12-04T08:03:17.6239430Z ==============================================================================
2017-12-04T08:03:21.9552420Z [command]curl -L https://storage.googleapis.com/kubernetes-release/release/stable.txt
2017-12-04T08:03:21.9974110Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2017-12-04T08:03:22.0386600Z                                  Dload  Upload   Total   Spent    Left  Speed
2017-12-04T08:03:22.0597370Z 
2017-12-04T08:03:22.1011260Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
2017-12-04T08:03:22.1658450Z 100     7  100     7    0     0     12      0 --:--:-- --:--:-- --:--:--    12
2017-12-04T08:03:22.2258960Z 100     7  100     7    0     0     12      0 --:--:-- --:--:-- --:--:--    12
2017-12-04T08:03:22.2840630Z v1.8.4
2017-12-04T08:03:22.5131140Z [command]mkdir -p /vsts/agent/_work/1/s/.vstsbin
2017-12-04T08:03:22.8566860Z [command]curl -L -o /vsts/agent/_work/1/s/.vstsbin/kubectl.v1.8.4 https://storage.googleapis.com/kubernetes-release/release/v1.8.4/bin/linux/amd64/kubectl
2017-12-04T08:03:22.8997790Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2017-12-04T08:03:22.9389170Z                                  Dload  Upload   Total   Spent    Left  Speed
2017-12-04T08:03:22.9582990Z 
2017-12-04T08:03:22.9979120Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
2017-12-04T08:03:23.7900820Z   8 49.9M    8 4112k    0     0  4316k      0  0:00:11 --:--:--  0:00:11 4314k
2017-12-04T08:03:23.9951980Z  86 49.9M   86 43.1M    0     0  23.2M      0  0:00:02  0:00:01  0:00:01 23.2M
2017-12-04T08:03:24.0555920Z 100 49.9M  100 49.9M    0     0  24.2M      0  0:00:02  0:00:02 --:--:-- 24.2M
2017-12-04T08:03:24.3469710Z [command]chmod 777 /vsts/agent/_work/1/s/.vstsbin/kubectl.v1.8.4
2017-12-04T08:03:24.6817300Z [command]cp /vsts/agent/_work/1/s/.vstsbin/kubectl.v1.8.4 /vsts/agent/_work/1/s/.vstsbin/kubectl
2017-12-04T08:03:25.1024370Z [command]/bin/bash .helmdownloader.sh
2017-12-04T08:03:26.3742110Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2017-12-04T08:03:26.4329710Z                                  Dload  Upload   Total   Spent    Left  Speed
2017-12-04T08:03:26.4600460Z 
2017-12-04T08:03:26.5104660Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
2017-12-04T08:03:26.5620920Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
2017-12-04T08:03:26.6126260Z  54 11.6M   54 6480k    0     0  5542k      0  0:00:02  0:00:01  0:00:01 5543k
2017-12-04T08:03:26.6635710Z 100 11.6M  100 11.6M    0     0  7953k      0  0:00:01  0:00:01 --:--:-- 7949k
2017-12-04T08:03:26.7145900Z cp: omitting directory 'kubernetes/helm'
2017-12-04T08:03:26.7635960Z (node:27869) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Failed to exec the .helmdownloader.sh which is helm downloader.
TsuyoshiUshio commented 6 years ago

Sorry about this issue. I'd like to reproduce. Could you share your configuration, please? Yesterday, I update to the new version.

TsuyoshiUshio commented 6 years ago

Ok. I'll have a look

TsuyoshiUshio commented 6 years ago

I run my pipeline to set 2.6.0, then it works. I'd like to reproduce. Could you share your pipeline, please? What I did on the comment is like this.

curl -L https://storage.googleapis.com/kubernetes-helm/helm-v2.6.0-linux-amd64.tar.gz | tar xz
cp **/helm /opt/vsts/work/r1/a/.vstsbin

Do you have any **/helm directory?

TsuyoshiUshio commented 6 years ago

The change I released yesterday is, it fails when I've got error when we execute a command. Before that I had a issue it doesn't error, even if it fails. In your environment, the script cause an error however, it was ignored. That is why, it passed. You might be able to use Continue on error on Control Options for currently, however, essentially, avoid **/helm directory might be the essential solution. I also, come up with the idea how to solve this issue.

vcorr commented 6 years ago

Also having this issue. My setup is brand new, so I haven't yet seen it working, the error is the same:

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Failed to exec the .helmdownloader.sh which is helm downloader.

I tried both the default helm version 2.5.0 and the one I have locally, 2.7.2 - no difference

wesyao commented 6 years ago

@TsuyoshiUshio Any update on this? I'm also getting this on releases at v2.8.2.

Log:

2018-04-06T04:23:27.9849679Z ##[section]Starting: helm upgrade
2018-04-06T04:23:28.0675689Z ==============================================================================
2018-04-06T04:23:28.0846956Z Task         : helm
2018-04-06T04:23:28.1035285Z Description  : execute helm command.
2018-04-06T04:23:28.1219035Z Version      : 1.0.3
2018-04-06T04:23:28.1387539Z Author       : Tsuyoshi Ushio
2018-04-06T04:23:28.1558553Z Help         : See [Kubernetes task](https://github.com/TsuyoshiUshio/KubernetesTask)
2018-04-06T04:23:28.1712435Z ==============================================================================
2018-04-06T04:23:30.2131897Z [command]/opt/vsts/work/r1/a/.vstsbin/helm upgrade canary . -i --dry-run --debug
2018-04-06T04:23:30.9326555Z Error: no Chart.yaml exists in directory "/opt/vsts/work/r1/a"
2018-04-06T04:23:30.9524394Z [debug] Created tunnel using local port: '37077'
2018-04-06T04:23:30.9721742Z (node:140) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Failed to execute helm command.
2018-04-06T04:23:30.9798729Z 
2018-04-06T04:23:30.9952231Z [debug] SERVER: "127.0.0.1:37077"
2018-04-06T04:23:31.0030267Z 
2018-04-06T04:23:31.0200885Z Release "canary" does not exist. Installing it now.
2018-04-06T04:23:31.0367532Z [debug] CHART PATH: /opt/vsts/work/r1/a
2018-04-06T04:23:31.0450727Z 
2018-04-06T04:23:31.1130523Z ##[section]Finishing: helm upgrade