Bug 86711

Summary: Isolating a templated unit does not work due to improper unit name mangling
Product: systemd Reporter: Ivan Shapovalov <intelfx100>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Ivan Shapovalov 2014-11-25 18:47:31 UTC
Unit names passed to `systemctl isolate` are improperly mangled,  escaping the '@' character and hence making an invalid unit name.

----
$ systemctl --user cat graphic@:0.target
# /home/operator/.config/systemd/user/graphic@.target
.include need-session@.target

[Unit]
Description=Graphical session %I
Requires=overall.target
AllowIsolate=yes

$ systemctl --user start graphic@:0.target

$ systemctl --user isolate graphic@:0.target
Failed to start graphic\x40:0.target: Operation refused, unit may not be isolated.
----

Patch will be sent to the ML shortly.
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-11-27 05:34:59 UTC
http://cgit.freedesktop.org/systemd/systemd/commit/?id=0c124f8b2c

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.