Improve admin workstation updater GUI error handling #5169
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
Ready for review
Description of Changes
Increase the time it will wait for tailsconfig to run.
Don't say the admin password was wrong on tailsconfig timeout. Instead, look for sudo in the output to determine if an incorrect password was given.
Add a new message explaining that tailsconfig took too long, and don't say "Exiting upgrade" when an incorrect admin password was given, as the updater is not exiting, and in fact we're telling the admin to try again.
Make sure the failure reason was cleared on each attempt.
Fixes #3642.
Testing
For those about to curse, we salute you. Ah, it's not that bad, but a bit manual.
cd Persistent/securedrop
git fetch --all
git diff origin/develop..origin/gui-updater-error-handling > ../updater.patch
git checkout 1.2.1
git apply ../updater.patch
Now bounce your network, most easily via the taskbar menu. After the network is reconnected and Tor restarts, the updater should pop up.
Update Now
.Administrator password incorrect.
Update Now
again, and enter the correct password. It should work this time. Close the updater.Now back in the terminal:
git checkout 1.2.1
journalist_gui/journalist_gui/SecureDropUpdater.py
to change the timeout on line 137 from 120 to 1.Update Now
.Tails workstation configuration took too long.
.git reset --hard HEAD
.Deployment
This doesn't change anything on the servers, just prevents a misleading error shown to admins.
Checklist
If you made changes to the server application code:
make lint
) and tests (make test
) pass in the development containerIf you made non-trivial code changes: