POCS icon indicating copy to clipboard operation
POCS copied to clipboard

POCS install scripts hangs with low bandwidth network

Open oguyon opened this issue 1 year ago • 2 comments

POCS install scripts hangs -forever- at the step write_udev_entries This occurs with low bandwidth connectivity. The issue does not come up with good network bandwidth.

This is most likely due to timeout of the sudo password. The script currently asks for sudo password at the start, assuming it will hold for the duration of the script

We tested a workaround: increase timeout from the 15mn default to 120mn, following instructions at https://www.omglinux.com/change-sudo-timeout-linux/

The POCS install scripts then succeeded with low bandwidth network

What is the cleanest solution ? ask password again ? increase timeout during scrips lifetime only ?

oguyon avatar Nov 24 '23 10:11 oguyon

Part of the problem is we are trying to hide things from the user so we wrap all the functions in a nice progress bar (same issue why error didn't appear for #1212).

Changing the sudo timeout works but ideally we could do this automatically.

We could also make an option on the install script that doesn't show the progress bar, but then there is a lot of text output and it might be overwhelming to people. They would eventually see it hanging at a password prompt though.

wtgee avatar Nov 24 '23 14:11 wtgee

Two ideas:

(1) We run the script as sudo Commands within the script can then use "sudo -u ${USER}" when sudo is not desired/required

(2) We store the passwd at the beginning of the script and use it whenever needed: read -s -p "sudo password : " pw echo $pw | sudo -k command

the -k option is to force sudo to ask for passwd

oguyon avatar Nov 24 '23 20:11 oguyon