Bug 1740662 - Invalid substitution type in udev rule
Summary: Invalid substitution type in udev rule
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mdadm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: XiaoNi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1748318 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-13 12:41 UTC by Lukas Slebodnik
Modified: 2020-01-31 02:00 UTC (History)
10 users (show)

Fixed In Version: mdadm-4.1-1.fc31
Clone Of:
Environment:
Last Closed: 2020-01-31 02:00:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.