2024-06-10 18:43:14 |
Andre Ruiz |
description |
I just had a case where the prepare-node-script failed to install juju, but the exit status of the script was still 0 so the installation continued only to fail later during sunbeam commands.
This is not critical, as the sunbeam command exit error was very explicit about missing juju, but perhaps it could make this more obvious earlier.
11:51:17 + sudo snap install --channel 3.4/stable juju
11:52:03 error: unable to contact snap store
[...]
11:52:03 DEBUG: execute return code is 0
This is the return code for the whole script, not for the juju command.
Maybe a good idea is to set -e in this script so that any errors will terminate it, and handle instead the cases where it is not critical as exceptions. |
I just had a case where the prepare-node-script failed to install juju, but the exit status of the script was still 0 so the installation continued only to fail later during sunbeam commands.
This is not critical, as the sunbeam command exit error was very explicit about missing juju, but perhaps it could make this more obvious earlier.
11:51:17 + sudo snap install --channel 3.4/stable juju
11:52:03 error: unable to contact snap store
[...]
11:52:03 DEBUG: execute return code is 0
This is the return code for the whole script, not for the juju command.
It failed later:
11:52:04 + sunbeam cluster join --role compute --token <supressed-token>
11:52:05 > Checking for host configuration of minimum 4 core and 16G RAM ...
11:52:05 > Checking for presence of Juju ...
11:52:05 Error: Juju not detected: please install snap
11:52:06 DEBUG: execute return code is 1
Maybe a good idea is to set -e in this script so that any errors will terminate it, and handle instead the cases where it is not critical as exceptions. |
|