From 0005ae31248ccf832cbffca4d06ce806dd27cf5e Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Tue, 9 Apr 2013 11:35:51 -0700 Subject: [PATCH] Sync scripts/. --- scripts/add_to_cluster | 11 +++++++++++ scripts/health_checks.d/service_ports_live | 13 ------------- scripts/health_checks.d/service_running | 13 ------------- scripts/remove_from_cluster | 2 ++ 4 files changed, 13 insertions(+), 26 deletions(-) delete mode 100755 scripts/health_checks.d/service_ports_live delete mode 100755 scripts/health_checks.d/service_running diff --git a/scripts/add_to_cluster b/scripts/add_to_cluster index e50ab019..7bb50464 100755 --- a/scripts/add_to_cluster +++ b/scripts/add_to_cluster @@ -1,2 +1,13 @@ #!/bin/bash +service corosync start || /bin/true +sleep 2 +while ! service pacemaker start; do + echo "Attempting to start pacemaker" + sleep 1; +done; crm node online +sleep 2 +while crm status | egrep -q 'Stopped$'; do + echo "Waiting for nodes to come online" + sleep 1 +done diff --git a/scripts/health_checks.d/service_ports_live b/scripts/health_checks.d/service_ports_live deleted file mode 100755 index 5ad0be0f..00000000 --- a/scripts/health_checks.d/service_ports_live +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Validate that service ports are active -HEALTH_DIR=`dirname $0` -SCRIPTS_DIR=`dirname $HEALTH_DIR` -. $SCRIPTS_DIR/scriptrc -set -e - -# Grab any OPENSTACK_PORT* environment variables -openstack_ports=`env| awk -F '=' '(/OPENSTACK_PORT/){print $2}'` -for port in $openstack_ports -do - netstat -ln | grep -q ":$port " -done diff --git a/scripts/health_checks.d/service_running b/scripts/health_checks.d/service_running deleted file mode 100755 index 8fe56e13..00000000 --- a/scripts/health_checks.d/service_running +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Validate that service is running -HEALTH_DIR=`dirname $0` -SCRIPTS_DIR=`dirname $HEALTH_DIR` -. $SCRIPTS_DIR/scriptrc -set -e - -# Grab any OPENSTACK_SERVICE* environment variables -openstack_service_names=`env| awk -F '=' '(/OPENSTACK_SERVICE/){print $2}'` -for service_name in $openstack_service_names -do - service $service_name status 2>/dev/null | grep -q running -done diff --git a/scripts/remove_from_cluster b/scripts/remove_from_cluster index 4fb2aa16..fc2d6f6f 100755 --- a/scripts/remove_from_cluster +++ b/scripts/remove_from_cluster @@ -1,2 +1,4 @@ #!/bin/bash crm node standby +service pacemaker stop +service corosync stop