← Back to team overview

ubuntu-translations-coordinators team mailing list archive

[Bug 1833618] [NEW] MAAS can't deploy Ubuntu if ID_SERIAL of any block device is broken (USB pendrive in this case).

 

You have been subscribed to a public bug:

[Impact]

 * sg3-utils-udev package introduces 55-scsi-sg3_id.rules udev rule that
take places BEFORE rules either finding correct ID_SERIAL for the USB
block device, or calculating it from "usb_id" parameter:

    - this rule changes USB ID_SERIAL parameter for the ones given by
the Vital Product Data from the block device.

    - USB memory sticks might not provide VPD pages (0x80, 0x83) and,
because of that, the USB ID_SERIAL will be broken.

    - because the failure in sg_inq command from the 55-XXX udev rules
file, to obtain the VPDs, the udev ACTION(add) takes long time and
consumers might not have considered a "settle" need.

 * Anything depending on ID_SERIAL udev attribute from USB block devices
might not find appropriate device.

 * Any type of udev consumer not calculating the need for a big time-consuming "udevadm settle" right after a pen drive is inserted
might not be able to see all USB block devices attributes from udev.

[Test Case]

 * Install package "sg3-utils-udev", monitor journalctl -f while
introducing a memory stick in your machine and watch sg_inq command
failing:

systemd-udevd[1021]: Process '/usr/bin/sg_inq --export
--inhex=/sys/block/sdb/device/vpd_pg83 --raw' failed with exit code 15.

 * Compare udevadm attributes with and without "sg3-utils-udev" package
is installed:

Without sg3-utils 55-scsi-sg3_id.rules:

$ udevadm info --query=all --name=/dev/sdb | grep -i serial
E: ID_SERIAL=Corsair_Voyager_Mini_3.0_070851D0E490C776-0:0
E: ID_SERIAL_SHORT=070851D0E490C776

With 55-scsi-sg3_id.rules:

$ udevadm info --query=all --name=/dev/sdb | grep -i serial
E: ID_SERIAL=3
E: ID_SERIAL_SHORT=2000acde48234567

[Regression Potential]

 * Minor: either I brake functionality for sg3-utils packages on USB
block devices. Since sg3-utils is used mostly for SCSI debugging,
management and investigations, its a very minor risk.

 * The change is a 1 line change in a udev rule file, very easy to test
following the test case.

[Other Info]


ORIGINAL DESCRIPTION:
 
* MAAS version: 2.4.2 (7034-g2f5deb8b8-0ubuntu1)

MAAS UI changes:

```
Node changed status - From 'Deploying' to 'Failed deployment'
Node installation failure - 'curtin' curtin command install
```

when console_log shows:

```

[  244.588201] cloud-init[3139]:           File "/curtin/curtin/commands/block_meta.py", line 1515, in get_path_if_present
[  244.588389] cloud-init[3139]:             return get_path_to_storage_volume(disk, config)
[  244.588588] cloud-init[3139]:           File "/curtin/curtin/commands/block_meta.py", line 433, in get_path_to_storage_volume
[  244.588774] cloud-init[3139]:             specified to identify disk")
[  244.588963] cloud-init[3139]:         ValueError: serial, wwn or path to block dev must be                 specified to identify disk
[  244.589153] cloud-init[3139]:         serial, wwn or path to block dev must be                 specified to identify disk
[  244.589338] cloud-init[3139]:
[  244.589523] cloud-init[3139]: Stderr: ''
[  244.589708] cloud-init[3139]: Unexpected error while running command.
[  244.589905] cloud-init[3139]: Command: ['curtin', 'block-meta', 'custom']
[  244.590088] cloud-init[3139]: Exit code: 3
[  244.590271] cloud-init[3139]: Reason: -
[  244.590459] cloud-init[3139]: Stdout: start: cmd-install/stage-partitioning/builtin/cmd-block-meta: curtin command block-meta
```

Reproducible: yes

aarch64, arm64 machine:
Manufacturer: CN8890-2000BG2601-CP-Y-G
Part Number: CN88xx

Cavium SOC
=========================
Cavium THUNDERX Boot Stub
=========================
BDK Version: 04.02.14, 2.38 Branch: gigabyte-2.38, Built: Fri Aug 18 01:16:58 UTC 2017

Board Model:    gbt-mt30
Board name:     MT30-GS1-00
System name:    R120-T33-00
Board Revision: 1.x
Board SKU:      04 SATA
SKU version:    1.1

Node:  0 (Fixed)
Chip:  0xa1 Pass 2.1
SKU:   CN8890-2000BG2601-CP-Y-G

*MAAS get-curtin-config: https://paste.ubuntu.com/p/k54HHN55ZF/

** Affects: ubuntu-translations
     Importance: Undecided
         Status: Invalid

** Affects: maas
     Importance: Undecided
         Status: Invalid

** Affects: sg3-utils (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: sg3-utils (Ubuntu Bionic)
     Importance: High
     Assignee: Rafael David Tinoco (rafaeldtinoco)
         Status: In Progress

** Affects: sg3-utils (Ubuntu Disco)
     Importance: High
     Assignee: Rafael David Tinoco (rafaeldtinoco)
         Status: Fix Committed

** Affects: sg3-utils (Ubuntu Eoan)
     Importance: Undecided
         Status: Fix Released

** Affects: sg3-utils (Ubuntu Focal)
     Importance: Undecided
         Status: Fix Released


** Tags: verification-needed verification-needed-disco
-- 
MAAS can't deploy Ubuntu if ID_SERIAL of any block device is broken (USB pendrive in this case).
https://bugs.launchpad.net/bugs/1833618
You received this bug notification because you are a member of Ubuntu Translations Coordinators, which is subscribed to Ubuntu Translations.