neutron-ha-tool: make start action retry
https://github.com/SUSE-Cloud/cookbook-openstack-network/pull/1 adds (amongst many other things) support for neutron-ha-tool to retry its connections to neutron-server. By taking advantage of this in this OCF RA, we can make failover more robust. Signed-off-by: Adam Spiers <aspiers@suse.com> Change-Id: I41c37500f691e2e0ecfd6c31f1720f483513e447
This commit is contained in:
parent
734f5f4e60
commit
a0451cbf57
|
@ -248,7 +248,14 @@ neutron_ha_tool_start() {
|
|||
INSECURE="--insecure"
|
||||
fi
|
||||
|
||||
${OCF_RESKEY_binary} --replicate-dhcp $INSECURE
|
||||
# Remain backwards-compatible with older neutron-ha-tool.py which
|
||||
# don't support --retry.
|
||||
retry=""
|
||||
if ${OCF_RESKEY_binary} --help | grep -q -- --retry; then
|
||||
retry="--retry"
|
||||
fi
|
||||
|
||||
${OCF_RESKEY_binary} --replicate-dhcp $retry $INSECURE
|
||||
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
|
@ -257,7 +264,7 @@ neutron_ha_tool_start() {
|
|||
return $OCF_ERR_GENERIC
|
||||
fi
|
||||
|
||||
${OCF_RESKEY_binary} --l3-agent-migrate --now $INSECURE
|
||||
${OCF_RESKEY_binary} --l3-agent-migrate $retry --now $INSECURE
|
||||
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
|
|
Loading…
Reference in New Issue