New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 765962 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 655192



Sign in to add a comment

nvme: update udev

Project Member Reported by gwendal@chromium.org, Sep 17 2017

Issue description

Current udev has no support for NVMe. Rules like ID_SERIAL are not populated. 

We need to be sure commit is present:
https://github.com/Stratoscale/systemd/commit/a5110c90303cf455db5062faef34d5724d12e2e9

See https://github.com/systemd/systemd/issues/1453 as well.

We either upgrade sys-fs/udev-225-r2, but be careful of systemd intergration or pick the specific rules.

The 4.5 changes to export serial information is already in chromeos-kernel_4.4
 
Cc: aprnin@chromium.org mnissler@chromium.org
Labels: -Pri-2 Pri-1
On a NVMe machine, session manager is not happy:

WARNING session_manager[1700]: [WARNING:server_backed_state_key_generator.cc(127)] Disk serial number missing!

It is because /init/scripts/ui-collect-machine-info relies on ID_SERIAL to be populated.

Upgrading to 233 is a pain, it may take a while (see build.log). Need to update sys-fs/lvm2 as well.

In the meantime, add a patch to udev-225-r2 (cl/701621)

sys-fs:udev-233-r1:20171005-001336.log
1.5 MB View Download
Labels: Merge-Request-62
Project Member

Comment 4 by sheriffbot@chromium.org, Oct 5 2017

Labels: -Merge-Request-62 Merge-Review-62 Hotlist-Merge-Review
This bug requires manual review: We are only 11 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
What patch are we merging?

Revving a package like this seems like it might have some risk, have we validated this on ToT/63?
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/0b8340cab8f0cbc1b0d61e3f8fccc0a0ef32d773

commit 0b8340cab8f0cbc1b0d61e3f8fccc0a0ef32d773
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Fri Oct 06 04:24:43 2017

sysfs/udev: add ID_SERIAL for nvme

Add rules to produce ID_SERIAL from nvme sysfs information.

Before:
localhost ~ # udevadm info -aq all /dev/nvme0n1
P: /devices/pci0000:00/0000:00:1c.4/0000:02:00.0/nvme/nvme0/nvme0n1
N: nvme0n1
E: DEVNAME=/dev/nvme0n1
E: DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/nvme/nvme0/nvme0n1
E: DEVTYPE=disk
E: ID_PART_TABLE_TYPE=gpt
E: ID_PART_TABLE_UUID=d723fceb-8ccd-e14c-a73f-7d98427d02da
E: MAJOR=259
E: MINOR=0
E: NPARTS=12
E: SUBSYSTEM=block
E: USEC_INITIALIZED=6660832

After:
udevadm info -aq all /dev/nvme0n1
P: /devices/pci0000:00/0000:00:1c.4/0000:02:00.0/nvme/nvme0/nvme0n1
N: nvme0n1
S: KUS040205M-B001_S3VBNY0J707899
S: disk/by-id/nvme-SAMSUNG
E: DEVLINKS=/dev/disk/by-id/nvme-SAMSUNG /dev/KUS040205M-B001_S3VBNY0J707899
E: DEVNAME=/dev/nvme0n1
E: DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/nvme/nvme0/nvme0n1
E: DEVTYPE=disk
E: ID_PART_TABLE_TYPE=gpt
E: ID_PART_TABLE_UUID=d723fceb-8ccd-e14c-a73f-7d98427d02da
E: ID_SERIAL=SAMSUNG KUS040205M-B001_S3VBNY0J707899
E: ID_SERIAL_SHORT=S3VBNY0J707899
E: MAJOR=259
E: MINOR=0
E: NPARTS=12
E: SUBSYSTEM=block
E: USEC_INITIALIZED=6872562

BUG= chromium:765962 
CQ-DEPEND=CL:617384
TEST=With the change, check login manager messages:
[WARNING:server_backed_state_key_generator.cc(127)] Disk serial number missing!
Are gone.

Change-Id: If578d770217506777f34b842dd8a20682aaaa441
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/701621
Tested-by: Gwendal Grignou <gwendal@google.com>
Reviewed-by: Gwendal Grignou <gwendal@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[rename] https://crrev.com/0b8340cab8f0cbc1b0d61e3f8fccc0a0ef32d773/sys-fs/udev/udev-225-r3.ebuild
[add] https://crrev.com/0b8340cab8f0cbc1b0d61e3f8fccc0a0ef32d773/sys-fs/udev/files/udev-225-60-persistent-storage.rules-add-nvme-symlinks.patch

Comment 7 by gwen...@gmail.com, Oct 7 2017

The patch above introduced an error when creating by-id symlink: the serial name has space in it, udev needs to be patched to translate them into _. Patch incoming.
Also, I need to check if session manager handles space in disk serial name property.
Labels: -Hotlist-Merge-Review -Merge-Review-62
Ok, when we have patches ready to merge please add the label again.
Labels: Merge-Request-62
The changes required are at:
https://chromium-review.googlesource.com/#/c/chromiumos/overlays/chromiumos-overlay/+/706149 sysfs/udev: Replace space in symlinks
https://chromium-review.googlesource.com/#/c/chromiumos/overlays/chromiumos-overlay/+/706150 sysfs/udev: Add ID_MODEL for NVMe device

and (this one is a cleanup, but will save us debug time):
https://chromium-review.googlesource.com/#/c/chromiumos/platform2/+/706148 login: Add quote around disk serial number


 

Project Member

Comment 10 by sheriffbot@chromium.org, Oct 9 2017

Labels: -Merge-Request-62 Merge-Review-62 Hotlist-Merge-Review
This bug requires manual review: We are only 7 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 11 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/25013c07881a4039929997e939fe033676a2f284

commit 25013c07881a4039929997e939fe033676a2f284
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Tue Oct 10 03:07:58 2017

login: Add quote around disk serial number

A serial number may contain space. Add quote to ensure the serial number is
properly interpreted.

BUG= chromium:765962 
TEST=Check in /run/session_manager/machine-info that serial numbers have quotes.
Check session_manager reports the full disk serial name.
Note that without quotes session_manager is interpreting the variable properly,
so this CL is a NOP feature-wise.

Change-Id: I848c3d6484ce9510c3d03334a316968732824a6e
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/706148
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/25013c07881a4039929997e939fe033676a2f284/login_manager/server_backed_state_key_generator_unittest.cc
[modify] https://crrev.com/25013c07881a4039929997e939fe033676a2f284/login_manager/init/scripts/ui-collect-machine-info

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/4e6e42a160dca6fc80690be06912b7eb72d754ee

commit 4e6e42a160dca6fc80690be06912b7eb72d754ee
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Tue Oct 10 12:31:02 2017

sysfs/udev: Replace space in symlinks

Ensure symlinks are correct when serial number contains space.

On a NVMe machine, udevadm info --query=property --name="${ROOTDEV}"
Before:
DEVLINKS=/dev/disk/by-id/nvme-SAMSUNG /dev/KUS040205M-B001_S3VBNY0J707899

After:
DEVLINKS=/dev/disk/by-id/nvme-SAMSUNG_KUS040205M-B001_S3VBNY0J707899

BUG= chromium:765962 
TEST=Check nvme and mmc device have valid disk/by-id links.

Change-Id: I6c19652f08067d0565fc174564b32d4b7f762fd9
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/706149
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[add] https://crrev.com/4e6e42a160dca6fc80690be06912b7eb72d754ee/sys-fs/udev/files/udev-225-udev-rules-perform-whitespace-replacement.patch
[add] https://crrev.com/4e6e42a160dca6fc80690be06912b7eb72d754ee/sys-fs/udev/files/udev-225-udev-event-add-replace_whitespace-param.patch
[rename] https://crrev.com/4e6e42a160dca6fc80690be06912b7eb72d754ee/sys-fs/udev/udev-225-r4.ebuild
[add] https://crrev.com/4e6e42a160dca6fc80690be06912b7eb72d754ee/sys-fs/udev/files/udev-225-libudev-util-change-util_replace_whitespace.patch

Project Member

Comment 13 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1b011c1b2fdc3d3f5ebc5a847d2da5c18f14f8c5

commit 1b011c1b2fdc3d3f5ebc5a847d2da5c18f14f8c5
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Tue Oct 10 12:31:02 2017

sysfs/udev: Add ID_MODEL for NVMe device

TO be consistent with ATA and SCSI devices, it allows autotest fio and
related like hardware_StorageQualBase to build proper device name.
[see autotest/files/client/cros/liststorage.py]

BUG= chromium:765962 
TEST=Check on a system with NVMe device that MODEL_ID variable is
present:
 udevadm info --query=all -n /dev/nvme0n1p1 | grep ID_MODEL
and
 udevadm info --query=all -n /dev/nvme0n1p1 | grep ID_MODEL
return:
E: ID_MODEL=SAMSUNG...
Check autotest "hardware_StorageFio.quicktest" reports the model name
properly for NVMe device:
cat ../results-1-hardware_StorageFio.quicktest/hardware_StorageFio/results/results-chart.json
{
  "_16k_read_read_clat_percentile_99.000000": {
      "SAMSUNG_KUS040205M-B001_512G": {
           "units": "us",
           ...
instead of
      "_512G": {
           ...

Change-Id: I9a4d498571c39aa98c89c889ab025bdce06f6dc7
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/706150
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[rename] https://crrev.com/1b011c1b2fdc3d3f5ebc5a847d2da5c18f14f8c5/sys-fs/udev/udev-225-r5.ebuild
[add] https://crrev.com/1b011c1b2fdc3d3f5ebc5a847d2da5c18f14f8c5/sys-fs/udev/files/udev-225-60-persistent-storage.rules-add-nvme-id-model.patch

Labels: -Hotlist-Merge-Review -Merge-Review-62 Merge-Approved-62
Approved for 62.
Project Member

Comment 15 by bugdroid1@chromium.org, Oct 12 2017

Labels: merge-merged-release-R62-9901.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/124996b1244e2356130ca43e43a4bfb1db7e423a

commit 124996b1244e2356130ca43e43a4bfb1db7e423a
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Thu Oct 12 14:59:56 2017

sysfs/udev: Add ID_MODEL for NVMe device

TO be consistent with ATA and SCSI devices, it allows autotest fio and
related like hardware_StorageQualBase to build proper device name.
[see autotest/files/client/cros/liststorage.py]

BUG= chromium:765962 
TEST=Check on a system with NVMe device that MODEL_ID variable is
present:
 udevadm info --query=all -n /dev/nvme0n1p1 | grep ID_MODEL
and
 udevadm info --query=all -n /dev/nvme0n1p1 | grep ID_MODEL
return:
E: ID_MODEL=SAMSUNG...
Check autotest "hardware_StorageFio.quicktest" reports the model name
properly for NVMe device:
cat ../results-1-hardware_StorageFio.quicktest/hardware_StorageFio/results/results-chart.json
{
  "_16k_read_read_clat_percentile_99.000000": {
      "SAMSUNG_KUS040205M-B001_512G": {
           "units": "us",
           ...
instead of
      "_512G": {
           ...

Change-Id: I9a4d498571c39aa98c89c889ab025bdce06f6dc7
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/706150
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 1b011c1b2fdc3d3f5ebc5a847d2da5c18f14f8c5)
Reviewed-on: https://chromium-review.googlesource.com/716302

[add] https://crrev.com/124996b1244e2356130ca43e43a4bfb1db7e423a/sys-fs/udev/udev-225-r5.ebuild
[add] https://crrev.com/124996b1244e2356130ca43e43a4bfb1db7e423a/sys-fs/udev/files/udev-225-60-persistent-storage.rules-add-nvme-id-model.patch

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/43effb27fef7a7fce3d0a5dfaa541ea4b16d4d40

commit 43effb27fef7a7fce3d0a5dfaa541ea4b16d4d40
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Thu Oct 12 14:59:59 2017

sysfs/udev: add ID_SERIAL for nvme

Add rules to produce ID_SERIAL from nvme sysfs information.

Before:
localhost ~ # udevadm info -aq all /dev/nvme0n1
P: /devices/pci0000:00/0000:00:1c.4/0000:02:00.0/nvme/nvme0/nvme0n1
N: nvme0n1
E: DEVNAME=/dev/nvme0n1
E: DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/nvme/nvme0/nvme0n1
E: DEVTYPE=disk
E: ID_PART_TABLE_TYPE=gpt
E: ID_PART_TABLE_UUID=d723fceb-8ccd-e14c-a73f-7d98427d02da
E: MAJOR=259
E: MINOR=0
E: NPARTS=12
E: SUBSYSTEM=block
E: USEC_INITIALIZED=6660832

After:
udevadm info -aq all /dev/nvme0n1
P: /devices/pci0000:00/0000:00:1c.4/0000:02:00.0/nvme/nvme0/nvme0n1
N: nvme0n1
S: KUS040205M-B001_S3VBNY0J707899
S: disk/by-id/nvme-SAMSUNG
E: DEVLINKS=/dev/disk/by-id/nvme-SAMSUNG /dev/KUS040205M-B001_S3VBNY0J707899
E: DEVNAME=/dev/nvme0n1
E: DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/nvme/nvme0/nvme0n1
E: DEVTYPE=disk
E: ID_PART_TABLE_TYPE=gpt
E: ID_PART_TABLE_UUID=d723fceb-8ccd-e14c-a73f-7d98427d02da
E: ID_SERIAL=SAMSUNG KUS040205M-B001_S3VBNY0J707899
E: ID_SERIAL_SHORT=S3VBNY0J707899
E: MAJOR=259
E: MINOR=0
E: NPARTS=12
E: SUBSYSTEM=block
E: USEC_INITIALIZED=6872562

BUG= chromium:765962 
CQ-DEPEND=CL:617384
TEST=With the change, check login manager messages:
[WARNING:server_backed_state_key_generator.cc(127)] Disk serial number missing!
Are gone.

Change-Id: If578d770217506777f34b842dd8a20682aaaa441
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/701621
Tested-by: Gwendal Grignou <gwendal@google.com>
Reviewed-by: Gwendal Grignou <gwendal@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 0b8340cab8f0cbc1b0d61e3f8fccc0a0ef32d773)
Reviewed-on: https://chromium-review.googlesource.com/716300

[rename] https://crrev.com/43effb27fef7a7fce3d0a5dfaa541ea4b16d4d40/sys-fs/udev/udev-225-r3.ebuild
[add] https://crrev.com/43effb27fef7a7fce3d0a5dfaa541ea4b16d4d40/sys-fs/udev/files/udev-225-60-persistent-storage.rules-add-nvme-symlinks.patch

Project Member

Comment 17 by bugdroid1@chromium.org, Oct 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/a3decac84bbda00c3ec9339c9da7022087a69ad1

commit a3decac84bbda00c3ec9339c9da7022087a69ad1
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Thu Oct 12 15:03:15 2017

login: Add quote around disk serial number

A serial number may contain space. Add quote to ensure the serial number is
properly interpreted.

BUG= chromium:765962 
TEST=Check in /run/session_manager/machine-info that serial numbers have quotes.
Check session_manager reports the full disk serial name.
Note that without quotes session_manager is interpreting the variable properly,
so this CL is a NOP feature-wise.

Change-Id: I848c3d6484ce9510c3d03334a316968732824a6e
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/706148
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 25013c07881a4039929997e939fe033676a2f284)
Reviewed-on: https://chromium-review.googlesource.com/716556

[modify] https://crrev.com/a3decac84bbda00c3ec9339c9da7022087a69ad1/login_manager/server_backed_state_key_generator_unittest.cc
[modify] https://crrev.com/a3decac84bbda00c3ec9339c9da7022087a69ad1/login_manager/init/scripts/ui-collect-machine-info

Project Member

Comment 18 by bugdroid1@chromium.org, Oct 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1546a973fc2f87c4188dd7ee9ccd2b37a4bb6ea3

commit 1546a973fc2f87c4188dd7ee9ccd2b37a4bb6ea3
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Thu Oct 12 15:03:15 2017

sysfs/udev: Replace space in symlinks

Ensure symlinks are correct when serial number contains space.

On a NVMe machine, udevadm info --query=property --name="${ROOTDEV}"
Before:
DEVLINKS=/dev/disk/by-id/nvme-SAMSUNG /dev/KUS040205M-B001_S3VBNY0J707899

After:
DEVLINKS=/dev/disk/by-id/nvme-SAMSUNG_KUS040205M-B001_S3VBNY0J707899

BUG= chromium:765962 
TEST=Check nvme and mmc device have valid disk/by-id links.

Change-Id: I6c19652f08067d0565fc174564b32d4b7f762fd9
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/706149
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 4e6e42a160dca6fc80690be06912b7eb72d754ee)
Reviewed-on: https://chromium-review.googlesource.com/716301

[add] https://crrev.com/1546a973fc2f87c4188dd7ee9ccd2b37a4bb6ea3/sys-fs/udev/files/udev-225-udev-rules-perform-whitespace-replacement.patch
[add] https://crrev.com/1546a973fc2f87c4188dd7ee9ccd2b37a4bb6ea3/sys-fs/udev/files/udev-225-udev-event-add-replace_whitespace-param.patch
[add] https://crrev.com/1546a973fc2f87c4188dd7ee9ccd2b37a4bb6ea3/sys-fs/udev/udev-225-r4.ebuild
[add] https://crrev.com/1546a973fc2f87c4188dd7ee9ccd2b37a4bb6ea3/sys-fs/udev/files/udev-225-libudev-util-change-util_replace_whitespace.patch

Project Member

Comment 19 by sheriffbot@chromium.org, Oct 16 2017

Cc: bhthompson@google.com
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 20 by sheriffbot@chromium.org, Oct 20 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Approved-62
Status: Fixed (was: Assigned)

Comment 22 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 23 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment