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

POCS install scripts hangs with low bandwidth network #1211

Open
oguyon opened this issue Nov 24, 2023 · 2 comments
Open

POCS install scripts hangs with low bandwidth network #1211

oguyon opened this issue Nov 24, 2023 · 2 comments

Comments

@oguyon
Copy link

oguyon commented Nov 24, 2023

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 oguyon added the bug label Nov 24, 2023
@wtgee
Copy link
Member

wtgee commented Nov 24, 2023

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.

@oguyon
Copy link
Author

oguyon commented Nov 24, 2023

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

@wtgee wtgee added the Software label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants