From 34c8352ec31eb0a34a17f9cead7bfffe375bf4aa Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 29 Nov 2024 14:37:13 +0100 Subject: [PATCH] sap_ha_pacemaker_cluster: fix UUID discovery for IBM Cloud VS --- .../platform/register_sysinfo_cloud_ibmcloud_powervs.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_cloud_ibmcloud_powervs.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_cloud_ibmcloud_powervs.yml index f53320b67..478ae9278 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_cloud_ibmcloud_powervs.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_cloud_ibmcloud_powervs.yml @@ -3,13 +3,12 @@ # Ansible facts rely on SMBIOS/DMI, which does not exist on ppc64le CPU Architecture. # Discovered input used for plug (via pcmk_host_map) -# The Instance ID in the IBM Power Virtual Server Workspace, is identical string to the UUID reported in the host -# alt command using IBM Power RSCT binary: /opt/rsct/bin/ctgethscid | grep PartitionUUID | cut -d \" -f2 -# alt command using cloud-init data: cat /run/cloud-init/instance-data.json | grep uuid | cut -d \" -f4 -# alt command using cloud-init data: cat /run/cloud-init/instance-data.json | grep instance_id | cut -d \" -f4 +# Reference - https://ibm.com/support/pages/node/7075598 +# The Instance ID in the IBM Power Virtual Server Workspace, must be identical string to the UUID reported in the host +# Use cloud-init data as definitive lookup on IBM Power VS, as IBM Power RSCT Binary /opt/rsct/bin/ctgethscid or Kernel data structure such as /proc/device-tree/ibm,partition-uuid - name: "SAP HA Prepare Pacemaker - IBM Cloud Power VS - IBM Power Virtual Server UUID" ansible.builtin.shell: | - set -o pipefail && echo $(tr -d '\0' < /proc/device-tree/ibm,partition-uuid) + set -o pipefail && echo $(cat /run/cloud-init/instance-data.json | grep instance_id | cut -d \" -f4) register: __sap_ha_pacemaker_cluster_register_ibmcloud_powervs_host changed_when: false check_mode: false