Sync scripts/.

This commit is contained in:
Adam Gandelman
2013-04-09 11:40:10 -07:00
parent 14df12f42f
commit fb964a2eee
5 changed files with 13 additions and 42 deletions

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

View File

@@ -1,16 +0,0 @@
#!/bin/bash
# Validate that service urls return expected content
HEALTH_DIR=`dirname $0`
SCRIPTS_DIR=`dirname $HEALTH_DIR`
. $SCRIPTS_DIR/scriptrc
set -e
# Grab any OPENSTACK_URL* environment variables and validate content response
openstack_urls=`env| awk -F '=' '(/OPENSTACK_URL/){print $2 }'`
for url_check in $openstack_urls
do
url=`echo $url_check| awk -F '|' '{print $1}'`
expected_content=`echo $url_check| awk -F '|' '{print $2}'`
wget -q -O - $url | grep -q "${expected_content//+/ }"
done

View File

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