Skip to content

Commit

Permalink
Merge pull request #903 from ja9fuchs/ibm-fix
Browse files Browse the repository at this point in the history
sap_ha_pacemaker_cluster: fix UUID discovery for IBM Cloud VS
  • Loading branch information
ja9fuchs authored Nov 29, 2024
2 parents 0932617 + 34c8352 commit 9d63f98
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9d63f98

Please sign in to comment.