2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 11:01:09 +00:00

Prefer IPv4 deployment over IPv6 when both are available

Some older vintages of RHEL and clones do not support IPv4,
best to prefer ipv4 to avoid messing up on places that have ipv6
configured.
This commit is contained in:
Jarrod Johnson 2021-12-08 17:04:04 -05:00
parent d258a2ae0d
commit cf686f8018

View File

@ -71,13 +71,15 @@ if [ ! -z "$dnsdomain" ] && [ "$dnsdomain" != "null" ]; then
fi
v6cfg=$(grep ^ipv6_method: /etc/confluent/confluent.deploycfg)
v6cfg=${v6cfg#ipv6_method: }
if [ "$v6cfg" = "static" ]; then
v4cfg=$(grep ^ipv4_method: /etc/confluent/confluent.deploycfg)
v4cfg=${v4cfg#ipv4_method: }
if [ "$v4cfg" = "static" ] || [ "$v4cfg" = "dhcp" ]; then
mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg)
mgr=${mgr#deploy_server: }
else
mgr=$(grep ^deploy_server_v6: /etc/confluent/confluent.deploycfg)
mgr=${mgr#deploy_server_v6: }
mgr="[$mgr]"
else
mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg)
mgr=${mgr#deploy_server: }
fi
profilename=$(grep ^profile: /etc/confluent/confluent.deploycfg)
profilename=${profilename#profile: }