Bug 1308795 - /dev/disk/by-id/wwn-* links for SATA devices have words in reverse order
/dev/disk/by-id/wwn-* links for SATA devices have words in reverse order
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: systemd-maint
Frantisek Sumsal
Lucie Maňásková
: ZStream
: 1273306 (view as bug list)
Depends On:
Blocks: 1203710 1289485 1311887
  Show dependency treegraph
 
Reported: 2016-02-16 01:28 EST by nikhil
Modified: 2016-11-03 20:51 EDT (History)
15 users (show)

See Also:
Fixed In Version: systemd-219-20.el7
Doc Type: Release Note
Doc Text:
A fix for systemd to read the device identification bytes correctly Due to an endianness problem, the version of systemd in Red Hat Enterprise Linux 7.2 read the device identification bytes in a wrong order, causing the `dev/disk/by-id/wwn-*` symbolic links to be generated incorrectly. A patch has been applied to put the device identification bytes in the correct order and the symbolic links are now generated correctly. Any reference that depends on the value obtained from `/dev/disk/by-id/wwn-*` needs to be modified to work correctly in Red Hat Enterprise Linux 7.3 and later.
Story Points: ---
Clone Of:
: 1311887 (view as bug list)
Environment:
Last Closed: 2016-11-03 20:51:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description nikhil 2016-02-16 01:28:18 EST
Description of problem:

 After upgrading from RHEL 7.1 to the latest RHEL 7.2 release, the order of the words used to generate the links under /dev/disk/by-id have been reversed. For example, instead of an entry such as wwn-0x4d30435853805002, this should be wwn-0x5002538043584d30.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
https://bugzilla.redhat.com/show_bug.cgi?id=1227503 is the upstream bug for same issue

Note from customer:

This is happening with RHEL  release 7.2.1511. The specific kernel version where this issue has been observed is 3.10.0-327.4.5.el7.x86_64.

After performing the 7.2 upgrade, the problem occurs 100% of the time. It is necessary to revert to RHEL 7.1 to solve the problem.

We rely on the wwn ids of disks in our software, making the assumption that they will never change for a given hard drive. We want to move to the 7.2 kernel to get other fixes that are included in this release but are not able to do so because of this issue with the incorrect wwn entries. We understand that a fix for this isn't planned until RHEL 7.3. We would like to see this escalated and a fix included in a sooner release, for example the z-stream update planned for the end of March.
Comment 3 Michal Sekletar 2016-02-16 03:23:22 EST
*** Bug 1273306 has been marked as a duplicate of this bug. ***
Comment 4 Lukáš Nykrýn 2016-02-16 03:47:10 EST
If the customer is interested to test the fix, here is a test build of currently staged patches for 7.3 which also includes fix for this issue.

https://copr.fedorainfracloud.org/coprs/lnykryn/systemd-rhel-staging/
Comment 15 Tom Coughlan 2016-04-18 17:14:09 EDT
It is important to notify users of this change in the RHEL 7.2 API. 

I have copied the Doc Text from the 7.2.z BZ here, with some modifications. Please review. This should be included prominently in the 7.3 Release Notes, IMO. 

Ben, will this impact automatically generated multipath user friendly names, or does multipath get the WWID from another source? 

(Thanks, Mulhern, for pointing out this issue.)
Comment 16 Ben Marzinski 2016-04-19 12:55:22 EDT
(In reply to Tom Coughlan from comment #15)
> 
> Ben, will this impact automatically generated multipath user friendly names,
> or does multipath get the WWID from another source? 

That depends. Lukáš, does this effect the value of ID_SERIAL in the udev database (or ID_UID, which we use for dasd devices)? If not, then multipath device names shouldn't be effected.
Comment 17 Lukáš Nykrýn 2016-04-20 07:46:33 EDT
From the code it looks that those variables should not be affected.
Comment 18 Tom Coughlan 2016-04-20 09:13:08 EDT
Barry, 

Please develop a test for this in 7.3 dm-multipath. 

The test summary is: install 7.2 with dm-multipath and user friendly names. Observe that the WWID in /dev/disk/by-id/wwn-* is incorrect. Take a look at the automatically generated mapping from mpathn to WWID. Hopefully it is the correct WWID. Update to 7.3. Observe that the WWID in /dev/disk/by-id/wwn-* is now correct. Make sure the mpathn mapping is correct and unchanged. 

Nikhil,

Please follow-up on comments 12, 13. Is this resolved? 


Tom
Comment 20 Barry Donahue 2016-04-20 09:56:35 EDT
I have sent an email out to the team. We will decide who will create the test case and put it into our 7.3 test plan.
Comment 25 Frantisek Sumsal 2016-09-21 09:27:24 EDT
Verified with systemd-219-30.el7.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: /dev/disk/by-id/wwn-* links' word order
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 06:19:09 ] :: [ INFO    ] :: Current ID: 5000c5004ef448e7
:: [ 06:19:09 ] :: [ INFO    ] :: Expected ID: 5000c5004ef448e7
:: [  BEGIN   ] :: If both IDs are empty, the machine doesn't have any SATA disk connected... :: actually running '[[ ! -z '5000c5004ef448e7' && ! -z '5000c5004ef448e7' ]]'
:: [   PASS   ] :: If both IDs are empty, the machine doesn't have any SATA disk connected... (Expected 0, got 0)
:: [  BEGIN   ] :: Running '[[ '5000c5004ef448e7' == '5000c5004ef448e7' ]]'
:: [   PASS   ] :: Command '[[ '5000c5004ef448e7' == '5000c5004ef448e7' ]]' (Expected 0, got 0)

Where current and expected IDs are following:
CURRENT_ID=$(udevadm info -p /sys/class/block/sda | grep "ID_WWN=" | sed -re 's/.*ID_WWN=0x(.+)/\1/')
EXPECTED_ID=$(hdparm -I /dev/sda | grep WWN | sed -re 's/.+ Identifier: (.+)/\1/')
Comment 27 errata-xmlrpc 2016-11-03 20:51:55 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2216.html

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