Bug 1952686

Summary: systemd-preset does not enable instantiated mount units with special character
Product: Red Hat Enterprise Linux 8 Reporter: Prashanth Sundararaman <psundara>
Component: systemdAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: Petr Matyáš <pmatyas>
Severity: medium Docs Contact:
Priority: urgent    
Version: 8.4CC: bgilbert, dtardon, fkrska, miabbott, pmatyas, smilner, systemd-maint-list
Target Milestone: betaKeywords: Bugfix, Triaged, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-239-48.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2042439 (view as bug list) Environment:
Last Closed: 2021-11-09 19:56:28 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: 2040195, 2042439, 2061952    

Description Prashanth Sundararaman 2021-04-22 21:07:52 UTC
Description of problem:
Found through - https://bugzilla.redhat.com/show_bug.cgi?id=1950974

There is a custom instantiated mount unit used whose name is `etc-NetworkManager-system\x2dconnections\x2dmerged.mount`. This mount unit was working fine with RHEL CoreOS 4.7 which is based on RHEL 8.3. When using RHEL CoreOS 4.8 which is based off of RHEL 8.4, this unit is not enabled by systemd-preset which is done through ignition. On changing the name of the mountpoint to `systemConnectionsMerged` rather than system-connections-merged and the unit's name to `etc-NetworkManager-systemConnectionsMerged.mount`, it works as expected.

Noticed that this was because the preset file contained:

enable etc-NetworkManager-system\x2dconnections\x2dmerged.mount

changing this to:

enable etc-NetworkManager-system\\x2dconnections\\x2dmerged.mount

worked. but the previous format used to work in RHEL8.3

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

How reproducible:
Always

Steps to Reproduce:
1.Create a mount unit with special character "-" encoded as \x2d
2.create preset file with just one slash for the \x2d
3.try to enable with systemctl preset

Actual results:
unit is not enabled

Expected results:
unit should be enabled

Additional info:

Comment 2 Lukáš Nykrýn 2021-06-22 12:28:18 UTC
fix merged to github master branch -> https://github.com/redhat-plumbers/systemd-rhel8/pull/171

Comment 6 Petr Matyáš 2021-08-17 13:17:47 UTC
Verified on systemd-239-49.el8.x86_64

Comment 8 errata-xmlrpc 2021-11-09 19:56:28 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 (systemd bug fix and enhancement update), 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/RHBA-2021:4469

Comment 9 Micah Abbott 2021-11-16 20:51:26 UTC
Since the problem was originally reported by someone working on RHCOS where the problem was seen, we'd like to see the fix backported to 8.4.z where multiple versions of RHCOS could consume the fix.

Most recently, this problem was observed again on a development version of RHCOS 4.10 that is using RHEL 8.4 - https://github.com/openshift/os/issues/665

Comment 10 Steve Milner 2022-01-14 15:10:24 UTC
David,

Do you happen to know the status in terms of the backport request? (https://bugzilla.redhat.com/show_bug.cgi?id=1952686#c9).