As a hint on reproducing it, it may be a problem on xenial only (which we used for that deployment) for clean devices.
On a bionic VM it seems like the symlink is created but it's not clear if luksFormat returns before that symlink gets created or after - this is the important part because the automation tries to use that symlink right after `cryptsetup luksFormat <dev>` exits.
As a hint on reproducing it, it may be a problem on xenial only (which we used for that deployment) for clean devices.
On a bionic VM it seems like the symlink is created but it's not clear if luksFormat returns before that symlink gets created or after - this is the important part because the automation tries to use that symlink right after `cryptsetup luksFormat <dev>` exits.
tree /sys/class/block /paste. ubuntu. com/p/vhjjzdytH 7/
https:/
uname -a
Linux maas-vhost6 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ maas-vhost6: ~$ tree /dev/disk/by-uuid/ 15f7-41de- 8c0e-20f795ed57 29 -> ../../sda1
/dev/disk/by-uuid/
└── d26a75c9-
0 directories, 1 file maas-vhost6: ~$ lsblk maas-vhost6: ~$ sudo cryptsetup luksFormat /dev/sdb
ubuntu@
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 64G 0 disk
└─sda1 8:1 0 64G 0 part /
sdb 8:16 0 8G 0 disk
sdc 8:32 0 102.4M 0 disk
sdd 8:48 0 102.4M 0 disk
sde 8:64 0 102.4M 0 disk
vda 252:0 0 102.4M 0 disk
vdb 252:16 0 102.4M 0 disk
nvme0n1 259:0 0 20G 0 disk
nvme1n1 259:1 0 20G 0 disk
ubuntu@
WARNING!
========
This will overwrite data on /dev/sdb irrevocably.
Are you sure? (Type uppercase yes): YES
Enter passphrase for /dev/sdb:
Verify passphrase:
ubuntu@ maas-vhost6: ~$ tree /dev/disk/by-uuid/ 7de8-4c6c- aaca-a074f000b7 46 -> ../../sdb 15f7-41de- 8c0e-20f795ed57 29 -> ../../sda1
/dev/disk/by-uuid/
├── a82ddfe0-
└── d26a75c9-
0 directories, 2 files
sudo cryptsetup luksFormat /dev/sdb
WARNING!
========
This will overwrite data on /dev/sdb irrevocably.
Are you sure? (Type uppercase yes): YES
Enter passphrase for /dev/sdb:
Verify passphrase:
ubuntu@ maas-vhost6: ~$ sudo cryptsetup luksDump /dev/sdb | grep UUID 9eea-4809- 9b1c-6f4d7e614f 5b
UUID: 21bacaf0-
ubuntu@ maas-vhost6: ~$ tree /dev/disk/by-uuid/ 9eea-4809- 9b1c-6f4d7e614f 5b -> ../../sdb 15f7-41de- 8c0e-20f795ed57 29 -> ../../sda1
/dev/disk/by-uuid/
├── 21bacaf0-
└── d26a75c9-
0 directories, 2 files