Bug 2284397 - ebsnvme-id creates broken sd* symlinks
Summary: ebsnvme-id creates broken sd* symlinks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: amazon-ec2-utils
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Major Hayden 🤠
QA Contact:
URL: https://github.com/amazonlinux/amazon...
Whiteboard:
: 2313526 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-06-03 08:24 UTC by Martin Pitt
Modified: 2024-09-26 00:18 UTC (History)
4 users (show)

Fixed In Version: amazon-ec2-utils-2.2.0-5.fc42 amazon-ec2-utils-2.2.0-5.fc41
Clone Of:
Environment:
Last Closed: 2024-09-23 15:59:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Martin Pitt 2024-06-03 08:24:21 UTC
The rawhide testing farm images recently started to install this new package by default. After some experimentation and log checking I am fairly convinced that this is part of the official Fedora AMIs, not specific to TF.

Unfortunately this ships some rather broken udev rules which create invalid device symlinks like /dev/sda1 -> nvme0n1 and /dev/sda12 -> nvme0n1p2. These are useless, confusing, and even dangerous as they "shadow" a real /dev/sda device, so you can't see partitions on the latter. Or rather, you add a /dev/sda and *think* you are working with its first partition /dev/sda1, but in reality you are changing /dev/nvme* (which is an entirely different storage device!)

Please see https://github.com/amazonlinux/amazon-ec2-utils/issues/37 for details.

If you want to fix this downstream, I suggest to drop these two lines from the udev rules:

KERNEL=="nvme[0-9]*n[0-9]*",        ENV{DEVTYPE}=="disk",      ATTRS{model}=="Amazon Elastic Block Store", PROGRAM="/usr/sbin/ebsnvme-id -u /dev/%k", SYMLINK+="%c"
KERNEL=="nvme[0-9]*n[0-9]*p[0-9]*", ENV{DEVTYPE}=="partition", ATTRS{model}=="Amazon Elastic Block Store", PROGRAM="/usr/sbin/ebsnvme-id -u /dev/%k", SYMLINK+="%c%n"


Reproducible: Always

Comment 1 Martin Pitt 2024-06-03 08:24:57 UTC
I set the "Version: 40" as this also happens in a Fedora 40 EC2 instance -- but there the package isn't installed by default.

Comment 2 Zbigniew Jędrzejewski-Szmek 2024-09-23 14:50:37 UTC
*** Bug 2313526 has been marked as a duplicate of this bug. ***

Comment 3 Tomáš Bžatek 2024-09-23 15:09:23 UTC
Martin has suggested dropping the two lines and I vote for that, though I would like to hear the reason for existence of such rules.

As an alternative and less intrusive approach a negative symlink priority might be a workaround - see bug 2313526#c5

Comment 4 Major Hayden 🤠 2024-09-23 15:44:48 UTC
I would be okay with that as well. I'll work up a patch.

Comment 5 Fedora Update System 2024-09-23 15:56:36 UTC
FEDORA-2024-dd2799248a (amazon-ec2-utils-2.2.0-5.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-dd2799248a

Comment 6 Fedora Update System 2024-09-23 15:59:44 UTC
FEDORA-2024-dd2799248a (amazon-ec2-utils-2.2.0-5.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Vojtech Trefny 2024-09-24 13:07:14 UTC
@mhayden Thank you for the fix, can you please backport it to Fedora 41 too?

Comment 8 Major Hayden 🤠 2024-09-24 21:02:30 UTC
Yes, I have a build on the way!

Comment 9 Fedora Update System 2024-09-24 21:09:22 UTC
FEDORA-2024-954abd2b9c (amazon-ec2-utils-2.2.0-5.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-954abd2b9c

Comment 10 Fedora Update System 2024-09-25 01:34:32 UTC
FEDORA-2024-954abd2b9c has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-954abd2b9c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-954abd2b9c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Tomáš Bžatek 2024-09-25 09:51:56 UTC
Cool, thanks!

Comment 12 Fedora Update System 2024-09-26 00:18:24 UTC
FEDORA-2024-954abd2b9c (amazon-ec2-utils-2.2.0-5.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, 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.