From 7643dc8a49d8f6533d9c00d3d0fcd643c3985e3a Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Fri, 18 Dec 2015 17:36:25 +0100 Subject: 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 --- extraconfig/tasks/pacemaker_resource_restart.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'extraconfig') 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 -- cgit 1.2.3-korg