Bug 1273306

Summary: [Regression] Incorrect ID_WWN_WITH_EXTENSION
Product: Red Hat Enterprise Linux 7 Reporter: Gris Ge <fge>
Component: systemdAssignee: systemd-maint
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: amulhern, fge, lnykryn, msekleta, ovasik, systemd-maint-list, the_plumber
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-16 08:23:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1289485    

Description Gris Ge 2015-10-20 07:56:50 UTC
Description of problem:

The system/udev code should use VPD83 NAA ID if VPD83 TGT(type 5) not found.
Code:
        systemd/src/udev/scsi_id/scsi_id.c
            scsi_id()
        systemd/src/udev/scsi_id/scsi_serial.c
            scsi_get_serial()
                do_scsi_page83_inquiry()
                    check_fill_0x83_id()
                        static const struct scsi_id_search_values id_search_list

But got this output:
===
$ sudo sg_vpd --page 0x83  /dev/disk/by-id/wwn-0x606c03f24ee65001|grep -A1 NAA
                                                 ^^^^^^^^^^^^^^^^
    designator type: NAA,  code set: Binary
        0x50014ee603f2606c
          ^^^^^^^^^^^^^^^^
$ udevadm info -q property /dev/disk/by-id/wwn-0x606c03f24ee65001|grep ID_WWN_
ID_WWN_WITH_EXTENSION=0x606c03f24ee65001
                      ^^^^^^^^^^^^^^^^^^
===

The correct VPD83 NAA ID above is: 0x50014ee603f2606c
But          ID_WWN_WITH_EXTENSION=0x606c03f24ee65001


Version-Release number of selected component (if applicable):
RHEL-7.2-20151015.0
systemd-219-19.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install OS on a server.
2. ls -l /dev/disk/by-id/ |grep wwn
3. sudo sg_vpd --page 0x83  /dev/disk/by-id/wwn-<WWN>|grep -A1 NAA

Actual results:
ID_WWN_WITH_EXTENSION is different from SCSI VPD83 NAA ID.

Expected results:
ID_WWN_WITH_EXTENSION use SCSI VPD83 NAA ID when VPD83 TGT ID not available.

Additional info:

Sounds like a big-endian vs little-endian issue to me.

Not sure a regression or not yet, still trying to reproduce this on other server.

Comment 1 Gris Ge 2015-10-21 02:52:37 UTC
Confirmed regression.

A ahci disk works well on RHEL 7.1, but got this issue once upgraded to 7.2.

Comment 3 Gris Ge 2015-10-21 03:23:40 UTC
Problem also found on mpt2sas disks.

Comment 12 Michal Sekletar 2016-02-16 08:23:22 UTC

*** This bug has been marked as a duplicate of bug 1308795 ***