Code Review
/
genesis.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Add openstack HA installer code with ansible for compass adapter
[genesis.git]
/
compass
/
deploy
/
ansible
/
openstack_juno
/
roles
/
ha
/
files
/
galera_chk
diff --git a/compass/deploy/ansible/openstack_juno/roles/ha/files/galera_chk
b/compass/deploy/ansible/openstack_juno/roles/ha/files/galera_chk
new file mode 100644
(file)
index 0000000..
9fd165c
--- /dev/null
+++ b/
compass/deploy/ansible/openstack_juno/roles/ha/files/galera_chk
@@ -0,0
+1,10
@@
+#! /bin/sh
+
+code=`mysql -uroot -e "show status" | awk '/Threads_running/{print $2}'`
+
+if [ "$code"=="1" ]
+then
+ echo "HTTP/1.1 200 OK\r\n"
+else
+ echo "HTTP/1.1 503 Service Unavailable\r\n"
+fi