Bug 1175822

Summary: systemd isolate forgets about SYSTEMD_WANTS from udev rules
Product: [openSUSE] openSUSE Tumbleweed Reporter: Fabian Vogt <fvogt>
Component: BasesystemAssignee: systemd maintainers <systemd-maintainers>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: fbui
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Fabian Vogt 2020-08-27 10:31:54 UTC
+++ This bug was initially created as a clone of Bug #1173749 +++

spice-vdagent.service works fine when booting into graphical.target, but fails when booting into multi-user.target and switching to graphical.target with "systemctl isolate graphical.target" or "init 5".

There is /usr/lib/udev/rules.d/70-spice-vdagentd.rules, which enables the socket once the virtio port appears. Apparently this is not part of the state which is kept across isolate.

Is there anything that can be done to make udev triggered units stay across isolate?
Maybe spice-vdagentd.socket needs IgnoreOnIsolate=true?
Comment 1 Fabian Vogt 2020-08-31 09:11:28 UTC
Seems to be the same as https://github.com/systemd/systemd/issues/16905
Comment 2 Fabian Vogt 2020-08-31 09:16:34 UTC
(In reply to Fabian Vogt from comment #1)
> Seems to be the same as https://github.com/systemd/systemd/issues/16905

Nope, it's not - after the isolate, the units are still there and spice-vdagentd.socket still has the correct WantedBy on the device.
Comment 3 Franck Bui 2020-09-07 10:06:49 UTC
(In reply to Fabian Vogt from comment #0)
> Is there anything that can be done to make udev triggered units stay across
> isolate?
> Maybe spice-vdagentd.socket needs IgnoreOnIsolate=true?

That would be the first option that comes to my mind.

Otherwise simply don't try to be too smart and start the socket unit unconditionally.

That said, this is rather a design issue that should be discussed with upstreams, so I'm closing this bug.