diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2015-06-15 15:43:05 -0400 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-06-16 08:37:08 -0700 |
commit | 97109756fa44be22b317c8491cecbf0de28747d6 (patch) | |
tree | 1f6fbbf4173f56d8772a633ec0fccf2cf6c5e117 /extras/ganesha | |
parent | 63a2ea7148ca58b4d2f0160d9c5b9bcf047c8c9e (diff) |
common-ha: cluster HA setup sometimes fails
the "s in the VIP_foo="x.x.x.x" lines are problematic now that
the config file isn't sourced.
(A short term work-around is to simply eliminate them.)
> Change-Id: I65f375f2d3b8453adb45dc3dbbc7d3fb07cf85d0
> BUG: 1232001
> Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
> http://review.gluster.org/#/c/11237/
Change-Id: Ib626795af5be0d23524271d32923ed4a0e7079f5
BUG: 1232002
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11238
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'extras/ganesha')
-rwxr-xr-x | extras/ganesha/scripts/ganesha-ha.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index 9d73cf93da0..7c7e9c558af 100755 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -343,11 +343,14 @@ setup_create_resources() while [[ ${1} ]]; do - ipaddr=$(grep "^VIP_${1}=" ${HA_CONFDIR}/ganesha-ha.conf | cut -d = -f 2) + name="VIP_${1}" + nvs=$(grep "^${name}=" ${HA_CONFDIR}/ganesha-ha.conf) + eval ${nvs} + eval ipaddr=\$$name pcs -f ${cibfile} resource create ${1}-cluster_ip-1 ocf:heartbeat:IPaddr ip=${ipaddr} cidr_netmask=32 op monitor interval=15s if [ $? -ne 0 ]; then - logger "warning pcs resource create ${1}-cluster_ip-1 ocf:heartbeat:IPaddr ip=${ipaddr} cidr_netmask=32 op monitor interval=10s failed" + logger "warning pcs resource create ${1}-cluster_ip-1 ocf:heartbeat:IPaddr ip=${ipaddr} cidr_netmask=32 op monitor interval=15s failed" fi pcs -f ${cibfile} resource create ${1}-trigger_ip-1 ocf:heartbeat:Dummy @@ -437,7 +440,10 @@ recreate_resources() local cibfile=${1}; shift while [[ ${1} ]]; do - ipaddr=$(grep "VIP_${1}=" ${HA_CONFDIR}/ganesha-ha.conf | cut -d = -f 2) + name="VIP_${1}" + nvs=$(grep "^${name}=" ${HA_CONFDIR}/ganesha-ha.conf) + eval ${nvs} + eval ipaddr=\$$name pcs -f ${cibfile} resource create ${1}-cluster_ip-1 ocf:heartbeat:IPaddr ip=${ipaddr} cidr_netmask=32 op monitor interval=15s if [ $? -ne 0 ]; then |