Bug 1740662

Summary: Invalid substitution type in udev rule
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: mdadmAssignee: XiaoNi <xni>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agk, belegdol, dledford, fedora, fschwarz, genes1122, h.reindl, jes.sorensen, taocrismon, xni
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mdadm-4.1-1.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-31 02:00:08 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:

Description Lukas Slebodnik 2019-08-13 12:41:52 UTC
Description of problem:
I noticed errors from udev when debugging unrelated issue 

Version-Release number of selected component (if applicable):
sh# rpm -qf /usr/lib/systemd/systemd-udevd /usr/lib/udev/rules.d/65-md-incremental.rules
systemd-udev-243~rc1-2.fc31.x86_64
mdadm-4.1-rc2.0.5.fc31.1.x86_64

How reproducible:
Deterministic

Steps to Reproduce:
1. boot your machine with mdadm installed
2. check journald for errors from systemd-udev

Actual results:
[root@host ~]# journalctl --boot | grep udev | grep 65-md-incremental.rules
Aug 13 10:04:09 host.example.com systemd-udevd[944]: /usr/lib/udev/rules.d/65-md-incremental.rules:28 Invalid value "/sbin/mdadm -I $env{DEVNAME} --export $devnode --offroot ${DEVLINKS}" for IMPORT (char 58: invalid substitution type), ignoring, but please fix it.

Expected results:
No errors in journald

Additional info:

Comment 1 Georg Sauthoff 2019-11-10 18:46:36 UTC
I can confirm this issue on a current Fedora 31 system:

# rpm -qf /usr/lib/systemd/systemd-udevd /usr/lib/udev/rules.d/65-md-incremental.rules
systemd-udev-243-4.gitef67743.fc31.x86_64
mdadm-4.1-rc2.0.5.fc31.1.x86_64

see also: Bug 1749859

Comment 2 Julian Sikorski 2019-12-15 10:39:21 UTC
https://src.fedoraproject.org/rpms/mdadm/pull-request/6

Comment 3 Felix Schwarz 2019-12-22 10:50:29 UTC
The pull request was merged a few days ago but as far as I can see there was no koji build. Would you mind triggering a build so that the fix is actually available for Fedora users?

Comment 4 Gene Snider 2019-12-28 00:25:38 UTC
There's a missing $ in line 28 of the rules file.  Until the patch is out, you can add it by changing line 28 in /usr/lib/udev/rules.d/65-md-incremental.rules to

 IMPORT{program}="/sbin/mdadm -I $env{DEVNAME} --export $devnode --offroot $${DEVLINKS}"

Notice the $$ in front of {DEVLINKS}.  The currently shipped file only has one $ there.

Gene

Comment 5 Peter Robinson 2020-01-13 09:10:00 UTC
*** Bug 1748318 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Update System 2020-01-14 01:43:18 UTC
mdadm-4.1-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-913d180f31

Comment 7 Harald Reindl 2020-01-24 08:58:25 UTC Comment hidden (abuse)
Comment 8 Fedora Update System 2020-01-31 02:00:08 UTC
mdadm-4.1-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.