NVMe symlinks broken by devices with spaces in model or serial strings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
maas-images |
Fix Released
|
Undecided
|
Unassigned | ||
systemd |
Fix Released
|
Unknown
|
|||
systemd (Debian) |
Fix Released
|
Unknown
|
|||
systemd (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Fix Released
|
High
|
Dimitri John Ledkov | ||
Xenial |
Fix Released
|
High
|
Unassigned | ||
Yakkety |
Fix Released
|
High
|
Unassigned | ||
Zesty |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact]
After including the patch from bug 1642903, NVMe devices that include spaces in their model or serial strings result in incorrect symlinks, e.g. if the model string is "XYZ Corp NVMe drive" then instead of creating:
/dev/disk/
it creates:
/dev/disk/
/dev/Corp -> nvme0n1
/dev/NVMe -> nvme0n1
/dev/drive_SERIAL -> nvme0n1
This is because of the way udev handles the SYMLINK value strings; by default, it does not do any whitespace replacement. To enable whitespace replacement of a symlink value, the rule must also include OPTIONS+
[Test Case]
This assumes using udev with the patch from bug 1642903.
Without this patch, when using a NVMe drive that contains spaces in its model and/or serial strings, check the /dev/disk/by-id/ directory. It should contain a partially-correct symlink to the NVMe drive, with the name up to the first space. All following space-separated parts of the mode/serial string should have symlinks in the /dev/ directory. This is the incorrect behavior.
With this patch, check the /dev/disk/by-id/ directory. It should contain a fully-correct symlink to the NVMe drive, and no part of the drive's model/serial number string should be a link in the /dev directory.
An example of the correct/incorrect naming is in the Impact section.
There should be no other changes to any of the symlinks under /dev before and after this patch. Typical locations for symlinks are /dev/, /dev/disk/by-name/, /dev/disk/by-id/, /dev/disk/by-uuid/, /dev/disk/by-label/
[Regression Potential]
Errors in udev rules can lead to an unbootable or otherwise completely broken system if they unintentionally break or clobber existing /dev/disks/ symlinks.
[Other Info]
This is also tracked with upstream systemd (udev) bug 4833:
https:/
Also note, this can be worked around in individual rules ONLY (i.e. not fixed for all rules) by appending OPTIONS+
KERNEL=
Related bugs:
* bug 1642903: introduce disk/by-id (model_serial) symlinks for NVMe drives
* bug 1651602: NVMe driver regression for non-smp/1-cpu systems
* bug 1649635: export nvme drive model/serial strings via sysfs (trusty)
description: | updated |
tags: | added: sts sts-sponsor sts-sru |
description: | updated |
Changed in systemd: | |
status: | Unknown → New |
description: | updated |
description: | updated |
Changed in systemd (Ubuntu Trusty): | |
status: | New → Confirmed |
Changed in systemd (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in systemd (Ubuntu Yakkety): | |
status: | New → Confirmed |
Changed in systemd (Ubuntu Trusty): | |
importance: | Undecided → High |
Changed in systemd (Ubuntu Xenial): | |
importance: | Undecided → High |
Changed in systemd (Ubuntu Yakkety): | |
importance: | Undecided → High |
Changed in systemd (Ubuntu Zesty): | |
importance: | Undecided → High |
Changed in systemd (Debian): | |
status: | Unknown → New |
Changed in maas-images: | |
status: | New → Fix Released |
Changed in systemd (Ubuntu Trusty): | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
milestone: | none → trusty-updates |
Changed in systemd (Ubuntu Trusty): | |
status: | Confirmed → In Progress |
Changed in systemd (Debian): | |
status: | New → Fix Released |
tags: | removed: sts-sponsor |
tags: |
added: sts-sru-done removed: sts-sru |
Changed in systemd: | |
importance: | Unknown → Undecided |
importance: | Undecided → Unknown |
status: | New → Unknown |
Changed in systemd: | |
status: | Unknown → Fix Released |
debdiffs added for t/x/y/z that add all 3 patches proposed in the upstream bug, that:
-change udev to replace spaces in all SYMLINK values by default (unless option string_escape=none is used by a rule)
-update test/udev-test.pl test case to use string_escape=none option for test cases that use spaces in their SYMLINK value, and expect the spaces to not be replaced
-update man page to clarify that spaces in SYMLINK values will be replaced with underscore, unless string_escape=none option is used