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

Skip VM updates if last check was performed <X hours ago #402

Closed
eloquence opened this issue Jan 9, 2020 · 6 comments · Fixed by #450
Closed

Skip VM updates if last check was performed <X hours ago #402

eloquence opened this issue Jan 9, 2020 · 6 comments · Fixed by #450

Comments

@eloquence
Copy link
Member

eloquence commented Jan 9, 2020

The launcher app currently checks for updates every single time, which can take a while. It would be good to skip this step if it has been performed very recently.

Open questions:

  • Should the launcher GUI be shown to the user at all in this case, or be bypassed entirely?
  • What is the maximum amount of time that may pass without checking for updates again?
@eloquence
Copy link
Member Author

Should the launcher GUI be shown to the user at all in this case, or be bypassed entirely?

I would vote to bypass the GUI entirely in this case, and to immediately launch the client instead.

@eloquence
Copy link
Member Author

Nominating as beta requirement as we don't want users to have to wait several minutes if they need to restart the client for any reason during a single session.

@emkll emkll removed the blocked label Jan 22, 2020
@emkll emkll self-assigned this Jan 22, 2020
@emkll emkll removed their assignment Jan 22, 2020
@eloquence
Copy link
Member Author

eloquence commented Jan 29, 2020

In addition to the client restart scenario, we currently run the "check for updates" after required reboots as well, which means that the dom0 updates take especially long to go through.

@zenmonkeykstop
Copy link
Contributor

So reqs for this are:

  • If updater has run within N hours, don't show GUI but go straight to client
  • If system has been rebooted by updater, don't show GUI but go straight to client
  • Otherwise, show GUI

Also adding:

  • In either of the first two cases, log the no-GUI start.

@emkll
Copy link
Contributor

emkll commented Feb 6, 2020

Yes that seems correct @zenmonkeykstop, and i would propose N=8:

  • read timestamp in sdw_last_updated flag from ~/.securedrop-launcher
  • if sdw_last_updated < 8h and last_required_reboot_performed() [1]: start client
  • else show launcher

[1] https://github.com/freedomofpress/securedrop-workstation/blob/master/launcher/sdw_updater_gui/Updater.py#L292

@zenmonkeykstop
Copy link
Contributor

zenmonkeykstop commented Feb 7, 2020

OK, adding an update_skip_delta value (in sec) in config.json, and a "--update-delta" (positive) integer arg to the launcher with Salt setting it appropriately.

Behavior will be:

  • if reload flag is set, clear reload flag and skip update check
  • if reload flag not set, --update_delta is set and > 0, and if sdw_last_updated - now > update_delta, do update check
  • if reload flag not set, --update_delta not set or = 0, do update check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants