Skip to content

Commit 136ea33

Browse files
authored
Update ha.sh
On a dual-stack OpenShift cluster the command 'hostname -i' gives two IPs back. We only need one IP, either IPv4 or IPv6, to build JBOSS_HA_ARGS.
1 parent 1a7c698 commit 136ea33

File tree

1 file changed

+2
-2
lines changed
  • modules/eap/setup/eap/modules/added/launch

1 file changed

+2
-2
lines changed

modules/eap/setup/eap/modules/added/launch/ha.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ generate_dns_ping_config() {
289289

290290
configure_ha_args() {
291291
# Set HA args
292-
IP_ADDR=`hostname -i`
292+
IP_ADDR=`hostname -i | cut -d " " -f1`
293293
JBOSS_HA_ARGS="-b ${JBOSS_HA_IP:-${IP_ADDR}} -bprivate ${JBOSS_HA_IP:-${IP_ADDR}}"
294294

295295
init_node_name
@@ -335,4 +335,4 @@ configure_ha() {
335335
elif [ "${CONF_PING_MODE}" = "cli" ]; then
336336
echo "${ping_protocol_element}" >> ${CLI_SCRIPT_FILE};
337337
fi
338-
}
338+
}

0 commit comments

Comments
 (0)