drbd udev rule with multiple symlinks fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
drbd-utils (Debian) |
Fix Released
|
Unknown
|
|||
drbd-utils (Ubuntu) |
Fix Released
|
Low
|
Dan Streetman | ||
Xenial |
Won't Fix
|
Low
|
Unassigned | ||
Bionic |
New
|
Low
|
Unassigned | ||
Cosmic |
Fix Released
|
Low
|
Dan Streetman |
Bug Description
The drbd udev rule creates multiple symlinks with a single udev rule, by space-separating them inside an env var. However, recent udev changes no longer allow doing that:
https:/
Now, recent versions of udev will, by default, replace any whitespace introduced into SYMLINK values by variable substitution, so the drbd udev rule that does this breaks:
ENV{SYMLINK}!="", SYMLINK=
when that SYMLINK env variable contains multiple symlinks, they are combined into a single symlink with an underscore joining them. Instead, since it's desired to leave all spaces in the env var in order to create multiple symlinks, the rule needs to use the "string_
ENV{SYMLINK}!="", SYMLINK=
Related ubuntu bug that introduced the new udev default whitespace replacement behavior:
https:/
Changed in drbd-utils: | |
status: | New → In Progress |
assignee: | nobody → Dan Streetman (ddstreet) |
affects: | drbd-utils → drbd-utils (Ubuntu) |
Changed in drbd-utils (Ubuntu Trusty): | |
status: | New → In Progress |
Changed in drbd-utils (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in drbd-utils (Ubuntu Artful): | |
status: | New → In Progress |
Changed in drbd-utils (Ubuntu Bionic): | |
status: | New → In Progress |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in drbd-utils (Ubuntu Artful): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in drbd-utils (Ubuntu Xenial): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in drbd-utils (Ubuntu Trusty): | |
assignee: | nobody → Dan Streetman (ddstreet) |
importance: | Undecided → Low |
Changed in drbd-utils (Ubuntu Xenial): | |
importance: | Undecided → Low |
Changed in drbd-utils (Ubuntu Artful): | |
importance: | Undecided → Critical |
importance: | Critical → Low |
Changed in drbd-utils (Ubuntu Bionic): | |
importance: | Undecided → Low |
Changed in drbd-utils (Ubuntu Cosmic): | |
importance: | Undecided → Low |
tags: | added: patch |
Changed in drbd-utils (Debian): | |
status: | Unknown → New |
Changed in drbd-utils (Debian): | |
status: | New → Fix Released |
no longer affects: | drbd-utils (Ubuntu Trusty) |
no longer affects: | drbd-utils (Ubuntu Artful) |
Changed in drbd-utils (Ubuntu Xenial): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in drbd-utils (Ubuntu Bionic): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in drbd-utils (Ubuntu Xenial): | |
status: | In Progress → New |
Changed in drbd-utils (Ubuntu Bionic): | |
status: | In Progress → New |
tags: | added: sts-sponsor-volunteer |
Changed in drbd-utils (Ubuntu Xenial): | |
status: | New → Won't Fix |
tags: | removed: sts-sponsor-volunteer |
Alternately, the drbd udev rule could be refactored, so it didn't place multiple symlinks into an env variable; for example, it could do this:
PROGRAM= "/usr/sbin/ drbdadm sh-udev minor-%m", SYMLINK="$result",
GOTO="have_symlink"
however, it would need to:
1) make the program return return success (0) if the symlink should be
created, and return failure (!0) if not
2) return only the plain-text symlinks strings; no "SYMLINK="
assignment
However, that would require updating the drbdadm program output as well as the udev rule.