Fix the rabbitmq/redis pacemaker resource timeouts on updates

With the following two changes we increased the timeout for redis and
rabbit for both starting and stopping to 200s:
https://review.openstack.org/386618 newton (merged)
https://review.openstack.org/385555 master (merged)

We want to also fix that on minor updates on all our supported
releases upstream and downstream (newton, mitaka, liberty, kilo).
This way we can guarantee that we have a uniform timeout for
sart and stop for rabbit and redis across all our releases.

Change-Id: If59bf3386832ee78d3a654f01077aff2e8be76e8
Closes-Bug: #1634851
This commit is contained in:
Michele Baldessari 2016-10-19 14:44:01 +02:00 committed by Emilien Macchi
parent 2dc1618e21
commit 3866490052
1 changed files with 19 additions and 0 deletions

View File

@ -44,6 +44,25 @@ fi
pacemaker_status=$(systemctl is-active pacemaker)
# Fix the redis/rabbit resource start/stop timeouts. See https://bugs.launchpad.net/tripleo/+bug/1633455
# and https://bugs.launchpad.net/tripleo/+bug/1634851
if [[ "$pacemaker_status" == "active" && \
"$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname)" ]] ; then
if pcs resource show rabbitmq | grep -E "start.*timeout=100"; then
pcs resource update rabbitmq op start timeout=200s
fi
if pcs resource show rabbitmq | grep -E "stop.*timeout=90"; then
pcs resource update rabbitmq op stop timeout=200s
fi
if pcs resource show redis | grep -E "start.*timeout=120"; then
pcs resource update redis op start timeout=200s
fi
if pcs resource show redis | grep -E "stop.*timeout=120"; then
pcs resource update redis op stop timeout=200s
fi
fi
if [[ "$pacemaker_status" == "active" ]] ; then
echo "Pacemaker running, stopping cluster node and doing full package update"
node_count=$(pcs status xml | grep -o "<nodes_configured.*/>" | grep -o 'number="[0-9]*"' | grep -o "[0-9]*")