MAAS can't deploy Ubuntu if ID_SERIAL of any block device is broken (USB pendrive in this case).
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sg3-utils (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
High
|
Rafael David Tinoco | ||
Disco |
Fix Released
|
High
|
Rafael David Tinoco | ||
Eoan |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* sg3-utils-udev package introduces 55-scsi-
- 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-
* Compare udevadm attributes with and without "sg3-utils-udev" package is installed:
Without sg3-utils 55-scsi-
$ udevadm info --query=all --name=/dev/sdb | grep -i serial
E: ID_SERIAL=
E: ID_SERIAL_
With 55-scsi-
$ udevadm info --query=all --name=/dev/sdb | grep -i serial
E: ID_SERIAL=3
E: ID_SERIAL_
[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-g2f5deb8b
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/
[ 244.588389] cloud-init[3139]: return get_path_
[ 244.588588] cloud-init[3139]: File "/curtin/
[ 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/
```
Reproducible: yes
aarch64, arm64 machine:
Manufacturer: CN8890-
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-
*MAAS get-curtin-config: https:/
Related branches
- Steve Langasek (community): Approve
- Rafael David Tinoco (community): Approve
- Ryan Harper (community): Approve
-
Diff: 156 lines (+130/-0)4 files modifieddebian/changelog (+8/-0)
debian/patches/55-scsi-sg3_id.rules-ID_SERIAL-fix.patch (+85/-0)
debian/patches/new-location-for-major-and-minor.patch (+35/-0)
debian/patches/series (+2/-0)
- Rafael David Tinoco (community): Approve
- Christian Ehrhardt (community): Approve
- Ryan Harper: Pending requested
- Canonical Server: Pending requested
-
Diff: 156 lines (+130/-0)4 files modifieddebian/changelog (+8/-0)
debian/patches/55-scsi-sg3_id.rules-ID_SERIAL-fix.patch (+85/-0)
debian/patches/new-location-for-major-and-minor.patch (+35/-0)
debian/patches/series (+2/-0)
- Christian Ehrhardt (community): Disapprove
- Rafael David Tinoco (community): Disapprove
- Andreas Hasenack: Abstain
- Canonical Server: Pending requested
-
Diff: 95 lines (+75/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/55-scsi-sg3_id.rules-ignore-USB-block-devices-by-def.patch (+67/-0)
debian/patches/series (+1/-0)
Changed in sg3-utils (Ubuntu): | |
status: | New → Incomplete |
status: | Incomplete → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
Changed in curtin: | |
status: | Triaged → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
description: | updated |
summary: |
- failing to deploy Ubuntu Disco + MAAS can't deploy Ubuntu if ID_SERIAL of any block device is broken (USB + pendrive in this case). |
Changed in sg3-utils (Debian): | |
importance: | Unknown → Undecided |
status: | Unknown → New |
affects: | sg3-utils (Debian) → maas |
Changed in maas: | |
status: | New → Invalid |
status: | Invalid → In Progress |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
Changed in curtin: | |
importance: | Undecided → Critical |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
affects: | curtin → ubuntu-translations |
no longer affects: | ubuntu-translations |
affects: | maas → ubuntu-translations |
no longer affects: | ubuntu-translations |
- id: sdc
model: USB Flash Drive
name: sdc
serial: '1510615541270083'
type: disk
wipe: superblock
Curtin will look for a symlink in /dev/disk/ by-id/* 151061554127008 3* and it doesn't appear to be present during the deployment.
I wonder if the USB device is now no longer present in the system when you deployed?
If so, you should recommission the node so update MAAS's view of storage configuration and it will not send configuration for that disk if it's not present in the system.