Comment 28 for bug 1735839

Dmitrii Shcherbakov (dmitriis) wrote :

Tested on (master at the time of writing): https://git.launchpad.net/curtin/commit/?id=7afd77faf99739cc2fe7ab0c256d2e153bccb604

LGTM

Note: see the attached domain.xml of a test machine sda (root disk) and vda do not have a serial attached. All devices except for sda were renamed in MAAS to <commissioning-dev-name>-renamed

maas <profile> machine read xeqrrw # post-deployment (successful without some serials which is expected)
https://paste.ubuntu.com/p/B69nKQ6zqg/

maas maas machine get-curtin-config xeqrrw
https://paste.ubuntu.com/p/dc8BJRs5Hd/

ubuntu@maas-vhost6:~$ tree /dev/disk/by-dname/
/dev/disk/by-dname/
├── nvme0n1-renamed -> ../../nvme0n1
├── nvme1n1-renamed -> ../../nvme1n1
├── sda -> ../../sda
├── sda-part1 -> ../../sda1
├── sdb-renamed -> ../../sdb
├── sdc-renamed -> ../../sdc
├── sdd-renamed -> ../../sdd
├── sde-renamed -> ../../sde
└── vdb-renamed -> ../../vdb

ubuntu@maas-vhost6:~$ for i in `ls -1 /dev/nvme* | grep -P 'nvme[0-9]n1$'` ; do echo $i ; cat /sys/class/block/`basename $i`/device/serial ; done
/dev/nvme0n1
nvmec0
/dev/nvme1n1
nvmec1

ubuntu@maas-vhost6:~$ for i in `ls -1 /sys/class/block/ | grep -P 'sd[a-z]$'` ; do echo $i ; sudo sg_vpd --page=0x80 /dev/$i ; done
sda
Unit serial number VPD page:
fetching VPD page failed: Illegal request
sdb
Unit serial number VPD page:
  Unit serial number: disk0
sdc
Unit serial number VPD page:
  Unit serial number: disk1
sdd
Unit serial number VPD page:
  Unit serial number: disk4
sde
Unit serial number VPD page:
  Unit serial number: disk5

for i in `ls -1 /dev/vd* | grep -P 'vd[a-z]$'` ; do echo $i ; cat /sys/class/block/`basename $i`/serial ; done
/dev/vda
/dev/vdb
disk3

root@maas-vhost6:~# grep "missing 'serial' or 'wwn' value" curtin-install.log
Cannot create disk tag udev rule for /dev/vda [id=vda-renamed], missing 'serial' or 'wwn' value