Open djasa opened 2 years ago
Yeah, a ton of stuff to do here potentially. Happy to mentor someone on this!
Yeah, a ton of stuff to do here potentially. Happy to mentor someone on this!
I'm using rpm-ostree
more heavily since last week due to recovery of system from FS corruption and some workflow changes so I at least dumped here what would IMO make rpm-ostree
more pleasant tool to work with (which is IMO important because people are more likely to need this when they are totally new to rpm-ostree
-based systems).
However having #3994 implemented or not is something that may be difference between people loving Silverblue (Kinoite, ...) for helping them out of difficult situation or abandoning it full of frustration from inability to do anything nor having any online clues.
Just for clarity, the above mentioned FS corruption is not strictly relevant to the feature request by itself.
The way I think about this, we're effectively breaking the bit of logic that lives (hmm, somewhere?) that invokes systemctl daemon-reload
after systemd units are updated. Ah OK, I think I found it...let's take https://src.fedoraproject.org/rpms/rtkit/blob/rawhide/f/rtkit.spec#_75 as a random example. That expands to:
$ rpm -q --scripts rtkit
...
postuninstall scriptlet (using /bin/sh):
if [ $1 -ge 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
# Package upgrade, not uninstall
/usr/lib/systemd/systemd-update-helper mark-restart-system-units rtkit-daemon.service || :
fi
Basically because we're uninstalling the old version, that mark-restart-system-units
I think will queue a systemctl daemon-reload
.
One approach we could take here is to either hook into or intercept /usr/lib/systemd/systemd-update-helper mark-restart-system-units
and queue it in memory.
But, eh. Also, that only helps for RPM content.
So I think what I'd vote here is that we do a filesystem-level diff between the running and new filesystem tree, and if we see anything in /usr/lib/systemd/system
as changed, then we invoke systemctl daemon-reload
on our own. We can also print out a list of modified units to possibly restart.
Host system details
Expected vs actual behavior
Run:
Actual (writing from top of my head):
Expected: rpm-ostree lists added or modified service files giving user clue what needs to be restarted or if it is maybe better to reboot. Optionally,
apply-live
could have something like--restart-services
and/or--start-services
arguments to do this for the users (restart is probably incontroversial, start of services in default configuration may be easily undesired. IMO).I see something like this mentioned in announce of release 2022.13 so this is just a bit of elaboration on the topic.
Steps to reproduce it
Would you like to work on the issue?
just testing