Bug 1643172

Summary: escaped systemd unit returns wrongly escaped (and different) Id
Product: Red Hat Enterprise Linux 7 Reporter: SHAURYA <sshaurya>
Component: systemdAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: medium Docs Contact:
Priority: urgent    
Version: 7.5CC: dtardon, fkrska, fsumsal, systemd-maint-list
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-219-64.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1691312 (view as bug list) Environment:
Last Closed: 2019-08-06 12:43:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1630917, 1643104, 1691312    

Description SHAURYA 2018-10-25 16:32:07 UTC
Description of problem:

escaped systemd unit retruns wrongly escaped (and different) Id

Version-Release number of selected component (if applicable):

Latest systemd release

How reproducible:

Always

Steps to Reproduce:

Run show all and grep the Id of an escaped unit

[]#  /usr/bin/systemctl --no-pager --all show -- 'systemd-fsck@dev-mapper-vg0\x2dscratch.service' |grep Id=
Id=systemd-fsck@dev-mapper-vg0\x5cx2dscratch.service

--> the extra x5c is the backslash (\) systemd-escape'd

no real issue with systemd-escape
# systemd-escape -u 'systemd-fsck@dev-mapper-vg0\x2dscratch.service'
systemd/fsck@dev/mapper/vg0-scratch.service


on fedora27, it gives the correct Id
 /usr/bin/systemctl --no-pager --all show -- "systemd-fsck@dev-mapper-vg0\x2dscratch.service" |grep Id=
Id=systemd-fsck@dev-mapper-vg0\x2dscratch.service

Comment 3 David Tardon 2018-11-28 19:25:45 UTC
(In reply to David Tardon from comment #2)
> fixed by
> https://github.com/systemd/systemd/commit/27e9c5af817147ea1c678769e45e83f2e4b4ae96

Oops. That is the commit that broke it. The fix is https://github.com/systemd/systemd/commit/3dfbc968e8343172faf754a3c81e27f0dbd8f157.

Comment 4 David Tardon 2018-11-28 19:40:38 UTC
https://github.com/lnykryn/systemd-rhel/pull/246

Comment 6 Lukáš Nykrýn 2019-02-11 09:43:11 UTC
fix merged to staging branch -> https://github.com/lnykryn/systemd-rhel/pull/246 -> post

Comment 14 errata-xmlrpc 2019-08-06 12:43:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2091