- removed health checks

- add-to and remove-from cluster a bit more robust for demo
This commit is contained in:
chad.smith@canonical.com 2013-04-05 17:34:01 -04:00
parent b4cc80b145
commit e8fb5a968d
5 changed files with 14 additions and 29 deletions

View File

@ -1 +1 @@
122
123

View File

@ -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

View File

@ -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

View File

@ -1,15 +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_SWIFT_SERVICE* environment variables
openstack_service_names=`env| awk -F '=' '(/OPENSTACK_SWIFT_SERVICE/){print $2}'`
for service_name in $openstack_service_names
do
# Double-negative: we want to ensure swift-init does not return
# 'No <service_name> running'
swift-init $service_name status 2>/dev/null | grep -vq "No $service_name running"
done

View File

@ -1,2 +1,4 @@
#!/bin/bash
crm node standby
service pacemaker stop
service corosync stop