From 14c5cd51e3ecf54fc77d9ddeb4fece2497a86127 Mon Sep 17 00:00:00 2001 From: Matt Pryor Date: Mon, 18 Nov 2024 12:38:28 +0000 Subject: [PATCH] Make block device detection work on ESXi --- ansible/roles/cluster_infra/templates/resources.tf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/cluster_infra/templates/resources.tf.j2 b/ansible/roles/cluster_infra/templates/resources.tf.j2 index 344137b62..f5d31e366 100644 --- a/ansible/roles/cluster_infra/templates/resources.tf.j2 +++ b/ansible/roles/cluster_infra/templates/resources.tf.j2 @@ -455,7 +455,7 @@ resource "openstack_compute_instance_v2" "control" { {%- endif %} bootcmd: %{for volume in [openstack_blockstorage_volume_v3.state, {% if not cluster_home_manila_share | bool %} openstack_blockstorage_volume_v3.home {% endif %}]} - - BLKDEV=$(readlink -f $(ls /dev/disk/by-id/*${substr(volume.id, 0, 20)}* | head -n1 )); blkid -o value -s TYPE $BLKDEV || mke2fs -t ext4 -L ${lower(split(" ", volume.description)[0])} $BLKDEV + - BLKDEV=$(readlink -f $(ls /dev/disk/by-id/*${replace(substr(volume.id, 0, 20), "-", "*")}* | head -n1 )); blkid -o value -s TYPE $BLKDEV || mke2fs -t ext4 -L ${lower(split(" ", volume.description)[0])} $BLKDEV %{endfor} mounts: - [LABEL=state, {{ appliances_state_dir }}, auto]