k3s
k3s copied to clipboard
Request: Tweak install script so error is shown in terminal when fail to download release
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
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.