Skip to content

Commit 135ea05

Browse files
authored
fix: fencing credentials for tnf require hostname (#1792)
updated fencing credentials to add hostname instead of node name for ipv6 and dualstack since they force fqdn hostnames for the node names. Signed-off-by: ehila <[email protected]>
1 parent 08f8883 commit 135ea05

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

utils.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,18 @@ function node_map_to_install_config_fencing_credentials() {
318318
credentials:
319319
EOF
320320
for ((idx=0;idx<$(($NUM_MASTERS));idx++)); do
321-
name="$(printf $MASTER_HOSTNAME_FORMAT ${idx})"
321+
hostname="$(printf $MASTER_HOSTNAME_FORMAT ${idx})"
322+
# IP V6 and DualStack will force FQDN hostname for the VMs, we need to update
323+
# this here to correctly set the hostname for the fencing credentials.
324+
if [[ $IP_STACK != 'v4' ]]; then
325+
hostname="${hostname}.${CLUSTER_DOMAIN}"
326+
fi
322327
username=$(node_val ${idx} "driver_info.username")
323328
password=$(node_val ${idx} "driver_info.password")
324329
address=$(node_val ${idx} "driver_info.address")
325330

326331
cat <<EOF
327-
- hostname: ${name}
332+
- hostname: ${hostname}
328333
address: ${address}
329334
username: ${username}
330335
password: ${password}

0 commit comments

Comments
 (0)