-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Services asked for by UDEV do not get triggered #7109
Comments
is the dependency from the device unit onto the service unit shown in the "systemctl show" output of the device unit? |
Which is the device unit in my case? And which is the service unit? |
Attached: Output of
|
Found the device unit name by some tinkering:
|
So, the relevant line in the "systemctl show" output is this one:
Which doesn't really match what you are expecting, right? Because that is |
And I got the above result with the corrected 70-printers.rules file:
See the
at the end of the first rule. |
btw, you really should use systemd-escape's |
I tried adding
As this also removes the leading slash from the path inserted in the service name I counteract this by adding a slash at the appropriate place in the udev-configure-printer command line in
Result is the same. Service does not start when plugging the printer but with printer plugged one can start it manually with Problem is still with the escaping and unescaping.
(note that service name has changed slightly, no
Relevant line:
|
Use |
|
…e it with sysfs path This should make cases like the user's setup in systemd#7109 a lot easier to handle, as in that case we'll do the right escaping automatically.
I have applied the patch now and tried again, without success. The
The
In this file I also tried
With
I get
and in
This means that udev-configure-printer gets called but the backslash gets lost somewhere and so the unescaping does not work. |
Hi, |
…e it with sysfs path This should make cases like the user's setup in systemd#7109 a lot easier to handle, as in that case we'll do the right escaping automatically.
…e it with sysfs path This should make cases like the user's setup in systemd#7109 a lot easier to handle, as in that case we'll do the right escaping automatically.
…e it with sysfs path This should make cases like the user's setup in systemd#7109 a lot easier to handle, as in that case we'll do the right escaping automatically.
…e it with sysfs path This should make cases like the user's setup in systemd#7109 a lot easier to handle, as in that case we'll do the right escaping automatically.
@poettering, what do you want with the patches 2460091 and |
Anything news on this? i found the device units is still exist after printer unplugged
but there is no 2-1.2 actually
|
@lulandco , @tillkamppeter : Devices units not going away after unplug, same as #7587,#8221 ? Please verify with |
I ran into a similar problem with usbmuxd. This is the rules file for it: When plugging it in (truncated for readability):
The |
Make sure that udev doesn't lose our properties when bind events come in, as implemented in kernels 4.12+. See systemd/systemd#8221 and systemd/systemd#7109
See https://superuser.com/a/1401322/166253 for workaround. |
Useful references: - systemd/systemd#7109 - systemd/systemd#10321 - systemd/systemd@dcebc9b Quick summary: there are still escaping-related misfeatures in systemd that can't be worked around using systemd-escape. For our particular use-case, @poettering has implemented a workaround that happens to do what we want; this commit switches over to using it (although this introduces a requirement that we use systemd version 236 or later). The general case is still broken.
So my educated guess is that this is just another issue triggered by this kernel fuck-up: #7587 THis is all about usb devices after all, i.e. those which get bvind/unbind events... |
The escaping of the hyphens in the UUID of the device path is getting lost between SYSTEMD_WANTS= and the Wants= of the resulting device as seen in 'systemctl show'. This means that our unit templat is getting called with 'x2d' in place of the hyphens rather than '\x2d' and the systemd-escape unmangling falls apart resulting in failed services. This is similar to systemd/systemd#7109, which references a commit which became: dcebc9bae4dc ("core: when a unit template is specified in SYSTEMD_WANTS=, instantiate it with sysfs path") This is included since v236 and allows us to simply let systemd fill in the escaped device path if we only supply the service template. We can then also remove the mdevctl script code previously necessary to generate that path. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Let's close this one, now that #7587 was addressed. |
Submission type
systemd version the issue has been seen with
Used distribution
In case of bug report: Expected behaviour you didn't see
In case of bug report: Unexpected behaviour you saw
In case of bug report: Steps to reproduce the problem
Please see all files, commands, configurations, and discussion up to now in the following Ubuntu bug report:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1721839
Especially note that the first assumption was a character escaping problem but fixing the UDEV rules file does not solve the problem. The problem stays as it is.
I will not copy all files and comments to here, see the Ubuntu bug report for them.
The text was updated successfully, but these errors were encountered: