Comment 2 for bug 1797480

Chad Smith (chad.smith) wrote :

Thanks Stephen,

Looking over udevadm info on /dev/sda & sdb on the Gen2 instances, it seems the deviceid of both is the following:

    ATTRS{device_id}=="{f8b3781a-1e82-4818-a1c3-63d806ec15bb}"

Since I don't just want cloud-init to attempt to setup links based solely on target luns, I'd like to be able to filter our udev rule matches by device_id or some portion of the device_id prefix if we think that is expected to be stable on Gen2 instances.

Do we know if device_id or some portion of that device_id exposed the Gen2 instances is expected to be static?

Example for Gen1 rule matching:

ATTRS{device_id}=="?00000000-0000-*", ENV{fabric_name}="azure_root", GOTO="ci_azure_names"
ATTRS{device_id}=="?00000000-0001-*", ENV{fabric_name}="azure_resource", GOTO="ci_azure_names"

Proposal on Gen2 matching:

ATTRS{device_id}=="?f8b3781a-1e82-*", SUBSYSTEMS="scsi", KERNELS="0:0:0:0", ENV{fabric_name}="azure_root", GOTO="ci_azure_names"
ATTRS{device_id}=="?f8b3781a-1e82-*", SUBSYSTEMS="scsi", KERNELS="0:0:0:1", ENV{fabric_name}="azure_resource", GOTO="ci_azure_names"