Comment 2 for bug 1837235

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

systemd relies on some udev properties to craft the message that will be displayed by the cryptsetup service when a password is required.

For this testcase, the scsi_debug module is loaded and the device created by it is used for the tests.

With xenial kernel 4.4.0-154-generic, udevadm returns for the scsi_debug block device:

$ udevadm info /dev/sdb
P: /devices/pseudo_0/adapter0/host2/target2:0:0/2:0:0:0/block/sdb
N: sdb
S: disk/by-id/scsi-35333333000001770
S: disk/by-id/wwn-0x5333333000001770
E: DEVLINKS=/dev/disk/by-id/scsi-35333333000001770 /dev/disk/by-id/wwn-0x5333333000001770
E: DEVNAME=/dev/sdb
E: DEVPATH=/devices/pseudo_0/adapter0/host2/target2:0:0/2:0:0:0/block/sdb
E: DEVTYPE=disk
E: ID_BUS=scsi
E: ID_MODEL=scsi_debug
E: ID_MODEL_ENC=scsi_debug\x20\x20\x20\x20\x20\x20
E: ID_REVISION=0184
E: ID_SCSI=1
E: ID_SCSI_SERIAL=6000
E: ID_SERIAL=35333333000001770
E: ID_SERIAL_SHORT=5333333000001770
E: ID_TARGET_PORT=300
E: ID_TYPE=disk
E: ID_VENDOR=Linux
E: ID_VENDOR_ENC=Linux\x20\x20\x20
E: ID_WWN=0x5333333000001770
E: ID_WWN_WITH_EXTENSION=0x5333333000001770
E: MAJOR=8
E: MINOR=16
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=121942203

However, with kernel 4.4.0-156-generic the output is:

$ udevadm info /dev/sdb
P: /devices/pseudo_0/adapter0/host2/target2:0:0/2:0:0:0/block/sdb
N: sdb
E: DEVNAME=/dev/sdb
E: DEVPATH=/devices/pseudo_0/adapter0/host2/target2:0:0/2:0:0:0/block/sdb
E: DEVTYPE=disk
E: MAJOR=8
E: MINOR=16
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=36737967

systemd expects one of the following properties to be set:
                  "ID_PART_ENTRY_NAME\0"
                  "DM_NAME\0"
                  "ID_MODEL_FROM_DATABASE\0"
                  "ID_MODEL\0";

But none of them is present with the newer kernel.