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

Print error when downloading file error inside install script #9154

Closed
caroline-suse-rancher opened this issue Jan 3, 2024 · 1 comment
Closed
Assignees
Milestone

Comments

@caroline-suse-rancher
Copy link
Contributor

This issue is to track the work done in #6874 by user @if-nil

When an error occurs in the download function of the installation script, the program will simply exit due to the effect of 'set -e':

ubuntu@test:~$ ./install.sh
[INFO]  Finding release for channel stable
[INFO]  Using stable as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/stable/sha256sum-amd64.txt
ubuntu@test:~$

This change can indicate a download error:

ubuntu@test:~$ ./install.sh
[INFO]  Finding release for channel stable
[INFO]  Using stable as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/stable/sha256sum-amd64.txt
[ERROR]  Download failed
ubuntu@test:~$
@VestigeJ
Copy link

Confirmed previous behavior
//previous install.sh missing set values in download() function
$ sudo INSTALL_K3S_VERSION=BAD_VERSION_INTENTIONALLY INSTALL_K3S_EXEC=TRAITOR ./install-k3s.sh

[INFO]  Using BAD_VERSION_INTENTIONALLY as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/BAD_VERSION_INTENTIONALLY/sha256sum-amd64.txt

novel behavior when passing bogus information to the script

$ sudo INSTALL_K3S_VERSION=BAD_VERSION_INTENTIONALLY INSTALL_K3S_EXEC=TRAITOR ./install-k3s.sh

[INFO]  Using BAD_VERSION_INTENTIONALLY as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/BAD_VERSION_INTENTIONALLY/sha256sum-amd64.txt
[ERROR]  Download failed

@github-project-automation github-project-automation bot moved this from To Test to Done Issue in K3s Development Jan 18, 2024
@VestigeJ VestigeJ assigned VestigeJ and unassigned endawkins Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants