Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Tweak install script so error is shown in terminal when fail to download release #1774

Closed
davidnuzik opened this issue May 7, 2020 · 1 comment · Fixed by #11335
Labels
kind/enhancement An improvement to existing functionality status/2023 confirmed
Milestone

Comments

@davidnuzik
Copy link
Contributor

Github has been having some issues as of 5/7/2020. Some users are trying to install k3s via the install.sh script. When they attempt to do so they see in shell (I have set -x set)

root@localhost:/usr/local/bin# curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=v1.17 sh -
+ INSTALL_K3S_CHANNEL=v1.17
+ curl -sfL https://get.k3s.io
+ sh -
[INFO]  Finding release for channel v1.17
[INFO]  Using v1.17.5+k3s1 as release
[INFO]  Downloading hash https://github.com/rancher/k3s/releases/download/v1.17.5+k3s1/sha256sum-amd64.txt
root@localhost:/usr/local/bin#

It would be neat if we could show an [ERROR] when we fail to download the release binary.

Additional info:

root@localhost:/usr/local/bin# echo $?
+ echo 22
22
@davidnuzik davidnuzik added kind/enhancement An improvement to existing functionality [zube]: Backlog labels May 7, 2020
@davidnuzik davidnuzik added this to the v1.19 - Backlog milestone May 7, 2020
@jonstelly
Copy link

jonstelly commented Aug 30, 2022

I'm getting this right now. I was half-way through setting up a new cluster and started getting the exact output above.

FWIW: https://github.com/k3s-io/k3s/releases/download/stable/sha256sum-arm64.txt is what's giving me a 404 right now.

No error showing up seems to be because of the set -e at the top of the install script.

I removed it just to see and without set -e I see this output which is much more helpful:

[INFO]  Finding release for channel stable
[INFO]  Using stable as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/stable/sha256sum-arm64.txt
[ERROR]  Download failed

Looking through the script there is some error handling but definitely not enough that simply removing the set -e is an option. I'm not a bash guy so not sure if there is some easy fix here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement An improvement to existing functionality status/2023 confirmed
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

3 participants