Write sdw-last-updated after upgrades in REBOOT_REQUIRED case#465
Write sdw-last-updated after upgrades in REBOOT_REQUIRED case#465zenmonkeykstop merged 1 commit intomasterfrom
sdw-last-updated after upgrades in REBOOT_REQUIRED case#465Conversation
The UpdateThread never newly discovers that a reboot is required, it only picks up a reboot requirement from prior runs. Even if we added logic to discover the reboot requirement earlier, we won't know for sure whether updates have been successfully applied until the UpgradeThreads have completed.
|
Prelim testing with a REBOOT_REQUIRED case suggests that it now works as intended; will write up a more formal test plan. |
|
What step did you take here, if any? |
|
|
|
Does |
|
Ok, forcing an update check after a reboot right now to see if it clears it, but will do some more troubleshooting once that's complete. |
|
Update check after reboot sets the status to the correct value and subsequent launcher runs within the default interval go straight to client. I think it just doesn't handle the case when the updater is rerun before rebooting, which is unlikely to happen as users are specifically told to reboot and given a handy button. |
|
The test plan incorrectly referred to the file we expect to be modified as |
If I interpret the description correctly, I'm unable to reproduce this, @zenmonkeykstop. If I downgrade It does run the check unnecessarily, which is already tracked in freedomofpress/securedrop-updater#17. Is that what you meant? That's the behavior both in |
|
Reran this on a fresh install (
LGTM |
zenmonkeykstop
left a comment
There was a problem hiding this comment.
Test plan passing on clean install! WFM
Write `sdw-last-updated` after upgrades in REBOOT_REQUIRED case

Status
Ready for review.
Description
The UpdateThread never newly discovers that a reboot is required, it only picks up a reboot requirement from prior runs. Even if we added logic to discover the reboot requirement earlier, we won't know for sure whether updates have been successfully applied until the UpgradeThreads have completed.
Resolves #462
Test plan
~/.securedrop_launcher/sdw-last-updatedor delete it from disk.fedora-30by runningdnf check-updateinside the template. If you do not, attempt to ensure a system state in which updates are available./opt/securedrop/launcher-sdw-launcher.py --skip-delta 0indom0. While the command runs, observe its output in~/.securedrop-launcher/launcher.log.~/.securedrop_launcher/sdw-last-updatedhas not been modified yet.~/.securedrop_launcher/sdw-last-updatedhas been updated.~/.securedrop_launcher/sdw-last-updatedhas not been modified again.Checklist
make testsucceeds indom0(haven't re-run; no provisioning changes in this PR)