Use the OpenStack volume ID to find the appropriate block device when labeling filesystem volumes.
Previously labeling relied on the ordering in /dev matching the order of the block device definitions in the terraform instance resource. This was the case for RockyLinux 8.8 images but does not appear to be the case for RockyLinux 8.9 images.
Notes:
The filesystem volume label is taken from the first word of the OpenStack volume description.
cloud-init'sruncmd happens after mounts, so bootcmd must be used to create filesystems.
The mount options used are the cloud-init mount module's defaults, except that nofail is not specified to avoid hard-to-diagnose problems and the home volume mount declares it is required by the NFS server.
If the image has hw_disk_bus='scsi' and hw_scsi_model='virtio-scsi' properties set, entries in /dev/disk-by-id contain the full openstack volume ID (plus a prefix). Without these properties, the entries only contain the first 20 characters of the openstack volume ID.
Use the OpenStack volume ID to find the appropriate block device when labeling filesystem volumes.
Previously labeling relied on the ordering in
/dev
matching the order of the block device definitions in the terraform instance resource. This was the case for RockyLinux 8.8 images but does not appear to be the case for RockyLinux 8.9 images.Notes:
cloud-init's
runcmd
happens after mounts, sobootcmd
must be used to create filesystems.mount
module's defaults, except thatnofail
is not specified to avoid hard-to-diagnose problems and the home volume mount declares it is required by the NFS server.hw_disk_bus='scsi'
andhw_scsi_model='virtio-scsi'
properties set, entries in/dev/disk-by-id
contain the full openstack volume ID (plus a prefix). Without these properties, the entries only contain the first 20 characters of the openstack volume ID.Fixes https://github.com/stackhpc/ansible-slurm-appliance/issues/327
TODO: