Closed TsuyoshiUshio closed 7 years ago
Yes we can change it to be current directory...
On Apr 27, 2017 12:11 AM, "Tsuyoshi Ushio" notifications@github.com wrote:
My customer try the download feature. However it fails by permission denied. I guess the root cause is writing the kubectl binary on the /usr/bin I recommend to download the current dir or staging dir and use it.
2017-04-27T07:03:42.6600595Z [command]curl -L https://storage.googleapis.com/kubernetes-release/release/stable.txt 2017-04-27T07:03:43.3733719Z v1.6.2 2017-04-27T07:03:43.3733719Z % Total % Received % Xferd Average Speed Time Time Time Current 2017-04-27T07:03:43.3733719Z Dload Upload Total Spent Left Speed 2017-04-27T07:03:43.3733719Z 2017-04-27T07:03:43.3733719Z 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 2017-04-27T07:03:43.3733719Z 100 7 100 7 0 0 29 0 --:--:-- --:--:-- --:--:-- 31 2017-04-27T07:03:43.3733719Z [command]curl -L -o /usr/bin/kubectl.v1.6.2 https://storage.googleapis.com/kubernetes-release/release/v1.6.2/bin/linux/amd64/kubectl 2017-04-27T07:03:43.3890448Z https://storage.googleapis.com/kubernetes-release/release/v1.6.2/bin/linux/amd64/kubectl2017-04-27T07:03:43.3890448Z % Total % Received % Xferd Average Speed Time Time Time Current 2017-04-27T07:03:43.3890448Z Dload Upload Total Spent Left Speed 2017-04-27T07:03:43.3890448Z 2017-04-27T07:03:43.5765035Z 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file /usr/bin/kubectl.v1.6.2: Permission denied 2017-04-27T07:03:43.5765035Z 2017-04-27T07:03:43.5765035Z 0 67.4M 0 629 0 0 3261 0 6:01:21 --:--:-- 6:01:21 3310 2017-04-27T07:03:43.5765035Z curl: (23) Failed writing body (0 != 629) 2017-04-27T07:03:43.5921035Z ##[error]Error: curl failed with return code: 23 2017-04-27T07:03:43.5921035Z ##[section]Finishing: kubectlapply 2017-04-27T07:03:43.5921035Z ##[section]Finishing: Release
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TsuyoshiUshio/KubernetesTask/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/ADQphTjOdOp15k19u_lHIi-2mzqNVCljks5r0D-GgaJpZM4NJ0a1 .
This is because the agent was windows. You right. We should add the feature that if you use hosted agent on windows, we should notice the user.
Hahahaha cool :)
On Apr 27, 2017 8:25 PM, "Tsuyoshi Ushio" notifications@github.com wrote:
This is because the agent was windows. You right. We should add the feature that if you use hosted agent on windows, we should notice the user.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/TsuyoshiUshio/KubernetesTask/issues/14#issuecomment-297897591, or mute the thread https://github.com/notifications/unsubscribe-auth/ADQphbv7yhhWgIvsr9HS9ZTBn37qFVgsks5r0VwwgaJpZM4NJ0a1 .
2017-05-29T15:42:35.6136450Z [command]curl -L -o /usr/bin/kubectl.v1.6.4 https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl
2017-05-29T15:42:35.6349070Z % Total % Received % Xferd Average Speed Time Time Time Current
2017-05-29T15:42:35.6560870Z Dload Upload Total Spent Left Speed
2017-05-29T15:42:35.6668410Z
2017-05-29T15:42:35.6882790Z 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file /usr/bin/kubectl.v1.6.4: Permission denied
2017-05-29T15:42:35.7101380Z
2017-05-29T15:42:35.7320000Z 0 67.4M 0 614 0 0 2104 0 9:20:04 --:--:-- 9:20:04 2102
2017-05-29T15:42:35.7533130Z curl: (23) Failed writing body (0 != 614)
2017-05-29T15:42:35.8622090Z ##[error]Error: curl failed with return code: 23
2017-05-29T15:42:35.9315510Z ##[section]Finishing: Set new image for deployment
This also fails when using a private Ubuntu 16.04 vm as a build agent, but fails with a different error code - but still the same problem.
Hmm. This time, it might be a directory to download to. It is said that "/usr/bin/kubectl.v1.6.4: Permission denied". Ubuntu agent machine might not allow /usr/bin for the user which you execute the agent. We might not download to /usr/bin. The problem it's self , you can solve just give permission to the /usr/bin/ to the agent user. However, it is not good for security policy. :( I'll try to change the directry. :)
Hi @rakelkar I create a pull request for detecting windows based agent. https://github.com/TsuyoshiUshio/KubernetesTask/pull/16
This will not solve @dtzar 's problem. I'll go on trying them.
Although, the new Kubernetes official task has been released on the //build. However, some people use this one and the official task didn't work for me.
For @dtzar 's problem, this pull request might work. :) https://github.com/TsuyoshiUshio/KubernetesTask/pull/17
https://github.com/TsuyoshiUshio/KubernetesTask/pull/17
I merged the pull request with 3.0.0. Please try. :) I close this. Thanks.
My customer try the download feature. However it fails by permission denied. I guess the root cause is writing the kubectl binary on the /usr/bin I recommend to download the current dir or staging dir and use it.