-
Notifications
You must be signed in to change notification settings - Fork 46
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
Don't enable sdw-notify.timer unit via Salt. Use systemd-rpm-macros and user unit preset file. #1088
Conversation
710318f
to
67eb670
Compare
ci failure unrelated to this change - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Always happy to see less salt.
I haven't waited the 2 hours to confirm this works, but I believe systemd is basically doing the same thing. So I don't expect it to be necessary.
However, I did notice that after sdw-admin --uninstall
the timer is still there. There is still a symlink:
lrwxrwxrwx 1 root root 38 Nov 29 13:33 /etc/systemd/user/default.target.wants/sdw-notify.timer -> /usr/lib/systemd/user/sdw-notify.timer
I'm guessing there is a way remove in in an uninstall hook? Last time I checked debian handlers even had something do deal with systemd stuff automatically. However, it wasn't feature complete.
Interestingly this would "fix" some issue that's happening in the CI for your other PR
|
Hey, thanks for the review. Re: uninstall: I kept the removal logic in the salt run, so running the |
67eb670
to
18da365
Compare
18da365
to
f593ee3
Compare
I have updated this PR in order to address the CI failures (which presumably could also imply real-world provisioning failures) that @deeplow and others have noticed a few different places (#1006, #1205) in a more consistent way, by avoiding running systemd user commands via salt orchestration. This PR does introduce an additional build dependency in our rpm .spec file (systemd-rpm-macros). These macros ship already with systemd. |
f593ee3
to
9a0e5e5
Compare
Add preset file for user systemd units. Use systemd rpm macro.
9a0e5e5
to
e00a878
Compare
I've stepped through the manual test plan (get rid of dom0 rpm and securedrop systemd user units, install this rpm, verify units are loaded) |
(as was rightly pointed out, now that this is coming in post 4.2 fresh install, I need to add an upgrade test plan!) |
Notes re upgrade scenario: The sdw-notify.service and .timer files were already managed by the workstation config rpm and installed at rpm install time, so there will be no conflict for folks upgrading. The difference is when/how the notify timer is enabled (rpm install time vs You can confirm this by installing the 1.0.0 rpm (and running the dom0 highstate), then installing this rpm on top of it. This means, if folks install the workstation-dom0-config rpm and then don't install SDW, they will have an edge case situation where they are notified to apply updates, but the SDW VMs haven't been provisioned yet. That is definitely an oddity, but it's consistent with other oddities about "configure at rpm install time" vs "configure during My opinion is that we should change/address that behaviour all together cause it's an edge case, but that it's acceptable right now. (For example, one way to address it would be to have the rpm post immediately pop up a GUI graphical installer ;) ). I'm documenting this so that no one is surprised, but noting that it's consistent with other changes we made as part of 4.2 compat. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the upgrade from from an up-to-date v1.0.0 and can confirm:
-
systemctl --user status sdw-notify.timer
-
systemctl status securedrop-user-xfce-icon-size
-
systemctl status securedrop-user-xfce-settings
correctly on:
ConditionPathExists=|!/var/lib/securedrop-workstation/dev ConditionPathExists=|/var/lib/securedrop-workstation/prod ConditionPathExists=|/var/lib/securedrop-workstation/staging
—with/var/lib/securedrop-workstation/dev
present.
Status
Ready for review
Description of Changes
Towards #1052
Fixes #1006
--global
for enabling user units.Testing
--uninstall
, or it could be sneakily removing the dom0 rpm and disabling then removing (deleting) the sd systemd servicessecuredrop-user-xfce-icon-size
,securedrop-user-xfce-settings
, andsdw-notify.timer
andsdw-notify.service
. Reload the systemd user daemon (systemctl --user daemon-reload) and ensure those services are not listed.make build-rpm
), and copy it into dom0, then install it. Reboot the laptop.systemctl --user status
for each ofsdw-notify.timer
,securedrop-user-xfce-icon-size
, andsecuredrop-user-xfce-settings
shows them as enabled, andsystemctl status securedrop-logind-override-disable
enabled (on dev systems the service will run; on staging and prod systems the expected behaviour is that the service will fail a ConditionPath check and be disabled.)Deployment
Any special considerations for deployment? Consider both:
Checklist
If you have made changes to the provisioning logic
make test
) pass indom0
If you have added or removed files
MANIFEST.in
andrpm-build/SPECS/securedrop-workstation-dom0-config.spec
If documentation is required