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

Safely shut down sys-usb; tweak logging #532

Merged
merged 1 commit into from Apr 15, 2020
Merged

Conversation

eloquence
Copy link
Member

@eloquence eloquence commented Apr 10, 2020

Status

Ready for review

Description of Changes

Resolves #531. Makes logging slightly more verbose to help diagnose issues with specific VMs.

sys-whonix is now treated as a "safe to shut down" system VM along with sys-usb (sd-whonix does not depend on it running).

Testing

Preparatory steps

(All testing should be done with an existing Qubes install at least at 0.2.4-rpm - dev, prod or staging should make no difference)

  1. Apply the changes in this PR to the launcher versions in /opt/securedrop/launcher and /srv/salt/launcher (if only the /opt copy is overwritten, the updater itself will replace it on the next run).
  2. Downgrade zlib (dnf downgrade zlib) in fedora-30 to ensure a realistic update scenario. Power off fedora-30.

Scenario: fedora-30 update

  1. Run /opt/securedrop/launcher/sdw-launcher.py --skip-delta 0. This forces an updater run.
    • Observe that the update completes successfully and that the zlib package in fedora-30 is now at the latest version
    • Observe that no unexpected errors are logged in ~/.securedrop_launcher/logs/launcher.log
    • Observe that sys-usb is running as expected and that the sd-devices workflow (automatic attachment of a LUKS-encrypted USB block device or USB printer to sd-devices) still works.

You may still encounter #498 due to the continued use of qvm-kill.

Checklist

  • Linter (make flake8) passes in the development environment (this box may
    be left unchecked, as flake8 also runs in CI)
  • All tests (make test) pass in dom0 of a Qubes install (N/A, updater has its own test suite which passes)
  • No package updates required

@conorsch
Copy link
Contributor

Have not reviewed yet, but did take the liberty of rebasing on latest master (8bfd1cf). I've had the sys-usb problem bite me on updater runs recently, so looking forward to reviewing, although likely not till next week.

Also groups sys-whonix with sys-usb
@eloquence
Copy link
Member Author

Tested in Qubes including with sys-whonix change in 4e54c89, did not encounter our friend #498 but I expect it will only be completely gone once we get rid of qvm-kill (and maybe even poll for successful VM startup given the HVM boot time).

@conorsch conorsch added this to Ready for Review in SecureDrop Team Board Apr 14, 2020
@conorsch conorsch moved this from Ready for Review to Under Review in SecureDrop Team Board Apr 14, 2020
@conorsch conorsch self-requested a review April 15, 2020 00:53
Copy link
Contributor

@conorsch conorsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well! Ran through the test plan, detected no problems. The sys-usb kill action has been problematic for me in the past, but wasn't able to observe any breakage on this branch. Merging, will continue to monitor behavior and reopen issue if I can spot the problem again post-merge!

@conorsch conorsch merged commit 5482f2e into master Apr 15, 2020
SecureDrop Team Board automation moved this from Under Review to Done Apr 15, 2020
@eloquence eloquence added this to the 0.3.0 milestone Apr 25, 2020
@emkll emkll mentioned this pull request May 20, 2020
19 tasks
cfm pushed a commit that referenced this pull request Apr 1, 2024
Safely shut down sys-usb; tweak logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Stop killing sys-usb in updater reboots
2 participants