From: Giulio Fidente Date: Fri, 18 Dec 2015 16:36:25 +0000 (+0100) Subject: Ensure cluster remains stable during services restarts X-Git-Tag: opnfv-6.0.0~2236^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=7643dc8a49d8f6533d9c00d3d0fcd643c3985e3a;p=apex-tripleo-heat-templates.git Ensure cluster remains stable during services restarts Using crm_resource --wait we wait for the cluster to get into a stable state before moving into the next step of the piloted restart procedure. Change-Id: I80199653024383fd07900dad0b8d23fb8afade26 Co-Authored-By: Jiri Stransky --- diff --git a/extraconfig/tasks/pacemaker_resource_restart.sh b/extraconfig/tasks/pacemaker_resource_restart.sh index 4e8b20fd..12201097 100755 --- a/extraconfig/tasks/pacemaker_resource_restart.sh +++ b/extraconfig/tasks/pacemaker_resource_restart.sh @@ -26,6 +26,7 @@ function check_resource { sleep $check_interval else echo "$service has $state" + timeout -k 10 $timeout crm_resource --wait return fi done @@ -50,7 +51,7 @@ if [ "$pacemaker_status" = "active" -a \ pcs resource disable httpd check_resource httpd stopped 300 pcs resource disable openstack-keystone - check_resource openstack-keystone stopped 1200 + check_resource openstack-keystone stopped 1800 if pcs status | grep haproxy-clone; then pcs resource restart haproxy-clone @@ -62,7 +63,7 @@ if [ "$pacemaker_status" = "active" -a \ pcs resource restart galera-master pcs resource enable openstack-keystone - check_resource openstack-keystone started 300 + check_resource openstack-keystone started 1800 pcs resource enable httpd check_resource httpd started 800