222 lines
13 KiB
Diff
222 lines
13 KiB
Diff
Index: git/ocf/cinder-api
|
|
===================================================================
|
|
--- git.orig/ocf/cinder-api 2014-09-17 13:13:09.768471050 -0400
|
|
+++ git/ocf/cinder-api 2014-09-23 10:22:33.294302829 -0400
|
|
@@ -244,18 +244,27 @@
|
|
fi
|
|
|
|
# Check detailed information about this specific version of the API.
|
|
- if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
|
- && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
- token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
|
- \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
|
- -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
|
- | cut -d'"' -f4 | head --lines 1`
|
|
- http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
|
- rc=$?
|
|
- if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
|
- ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
|
|
- return $OCF_NOT_RUNNING
|
|
- fi
|
|
+# if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
|
+# && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
+# token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
|
+# \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
|
+# -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
|
+# | cut -d'"' -f4 | head --lines 1`
|
|
+# http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
|
+# rc=$?
|
|
+# if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
|
+# ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
|
|
+# return $OCF_NOT_RUNNING
|
|
+# fi
|
|
+# fi
|
|
+ #suppress the information displayed while checking detailed information about this specific version of the API
|
|
+ if [ -n "$OCF_RESKEY_os_username"] && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
+ ./validation $OCF_RESKEY_keystone_get_token_url $OCF_RESKEY_os_username $OCF_RESKEY_os_tenant_name
|
|
+ rc=$?
|
|
+ if [ $rc -ne 0 ]; then
|
|
+ ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
|
|
+ return $OCF_NOT_RUNNING
|
|
+ fi
|
|
fi
|
|
|
|
ocf_log debug "OpenStack Cinder API (cinder-api) monitor succeeded"
|
|
Index: git/ocf/glance-api
|
|
===================================================================
|
|
--- git.orig/ocf/glance-api 2014-09-17 13:13:09.768471050 -0400
|
|
+++ git/ocf/glance-api 2014-09-23 10:16:35.903826295 -0400
|
|
@@ -236,11 +236,9 @@
|
|
fi
|
|
|
|
# Monitor the RA by retrieving the image list
|
|
- if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
|
- && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_os_auth_url" ]; then
|
|
+ if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_os_auth_url" ]; then
|
|
ocf_run -q $OCF_RESKEY_client_binary \
|
|
--os_username "$OCF_RESKEY_os_username" \
|
|
- --os_password "$OCF_RESKEY_os_password" \
|
|
--os_tenant_name "$OCF_RESKEY_os_tenant_name" \
|
|
--os_auth_url "$OCF_RESKEY_os_auth_url" \
|
|
index > /dev/null 2>&1
|
|
Index: git/ocf/glance-registry
|
|
===================================================================
|
|
--- git.orig/ocf/glance-registry 2014-09-17 13:13:09.768471050 -0400
|
|
+++ git/ocf/glance-registry 2014-09-23 10:22:58.078475044 -0400
|
|
@@ -246,18 +246,27 @@
|
|
|
|
# Check whether we are supposed to monitor by logging into glance-registry
|
|
# and do it if that's the case.
|
|
- if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
|
- && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
- token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
|
- \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
|
- -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
|
- | cut -d'"' -f4 | head --lines 1`
|
|
- http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
|
- rc=$?
|
|
- if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
|
- ocf_log err "Failed to connect to the OpenStack ImageService (glance-registry): $rc and $http_code"
|
|
- return $OCF_NOT_RUNNING
|
|
- fi
|
|
+# if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
|
+# && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
+# token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
|
+# \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
|
+# -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
|
+# | cut -d'"' -f4 | head --lines 1`
|
|
+# http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
|
+# rc=$?
|
|
+# if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
|
+# ocf_log err "Failed to connect to the OpenStack ImageService (glance-registry): $rc and $http_code"
|
|
+# return $OCF_NOT_RUNNING
|
|
+# fi
|
|
+# fi
|
|
+ #suppress the information displayed while checking detailed information about this specific version of the API
|
|
+ if [ -n "$OCF_RESKEY_os_username"] && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
+ ./validation $OCF_RESKEY_keystone_get_token_url $OCF_RESKEY_os_username $OCF_RESKEY_os_tenant_name
|
|
+ rc=$?
|
|
+ if [ $rc -ne 0 ]; then
|
|
+ ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
|
|
+ return $OCF_NOT_RUNNING
|
|
+ fi
|
|
fi
|
|
|
|
ocf_log debug "OpenStack ImageService (glance-registry) monitor succeeded"
|
|
Index: git/ocf/keystone
|
|
===================================================================
|
|
--- git.orig/ocf/keystone 2014-09-17 13:13:09.768471050 -0400
|
|
+++ git/ocf/keystone 2014-09-23 10:18:30.736618732 -0400
|
|
@@ -237,12 +237,10 @@
|
|
|
|
# Check whether we are supposed to monitor by logging into Keystone
|
|
# and do it if that's the case.
|
|
- if [ -n "$OCF_RESKEY_client_binary" ] && [ -n "$OCF_RESKEY_os_username" ] \
|
|
- && [ -n "$OCF_RESKEY_os_password" ] && [ -n "$OCF_RESKEY_os_tenant_name" ] \
|
|
+ if [ -n "$OCF_RESKEY_client_binary" ] && [ -n "$OCF_RESKEY_os_password" ] && [ -n "$OCF_RESKEY_os_tenant_name" ] \
|
|
&& [ -n "$OCF_RESKEY_os_auth_url" ]; then
|
|
ocf_run -q $OCF_RESKEY_client_binary \
|
|
--os-username "$OCF_RESKEY_os_username" \
|
|
- --os-password "$OCF_RESKEY_os_password" \
|
|
--os-tenant-name "$OCF_RESKEY_os_tenant_name" \
|
|
--os-auth-url "$OCF_RESKEY_os_auth_url" \
|
|
user-list > /dev/null 2>&1
|
|
Index: git/ocf/neutron-server
|
|
===================================================================
|
|
--- git.orig/ocf/neutron-server 2014-09-17 13:13:13.872502871 -0400
|
|
+++ git/ocf/neutron-server 2014-09-23 10:23:39.358761926 -0400
|
|
@@ -256,18 +256,27 @@
|
|
fi
|
|
|
|
# Check detailed information about this specific version of the API.
|
|
- if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
|
- && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
- token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
|
- \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
|
- -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
|
- | cut -d'"' -f4 | head --lines 1`
|
|
- http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
|
- rc=$?
|
|
- if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
|
- ocf_log err "Failed to connect to the OpenStack Neutron API (neutron-server): $rc and $http_code"
|
|
- return $OCF_NOT_RUNNING
|
|
- fi
|
|
+# if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
|
+# && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
+# token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
|
+# \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
|
+# -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
|
+# | cut -d'"' -f4 | head --lines 1`
|
|
+# http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
|
+# rc=$?
|
|
+# if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
|
+# ocf_log err "Failed to connect to the OpenStack Neutron API (neutron-server): $rc and $http_code"
|
|
+# return $OCF_NOT_RUNNING
|
|
+# fi
|
|
+# fi
|
|
+ #suppress the information displayed while checking detailed information about this specific version of the API
|
|
+ if [ -n "$OCF_RESKEY_os_username"] && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
+ ./validation $OCF_RESKEY_keystone_get_token_url $OCF_RESKEY_os_username $OCF_RESKEY_os_tenant_name
|
|
+ rc=$?
|
|
+ if [ $rc -ne 0 ]; then
|
|
+ ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
|
|
+ return $OCF_NOT_RUNNING
|
|
+ fi
|
|
fi
|
|
|
|
ocf_log debug "OpenStack Neutron Server (neutron-server) monitor succeeded"
|
|
Index: git/ocf/nova-api
|
|
===================================================================
|
|
--- git.orig/ocf/nova-api 2014-09-17 13:13:15.240513478 -0400
|
|
+++ git/ocf/nova-api 2014-09-23 10:23:20.454630543 -0400
|
|
@@ -244,18 +244,27 @@
|
|
fi
|
|
|
|
# Check detailed information about this specific version of the API.
|
|
- if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
|
- && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
- token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
|
- \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
|
- -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
|
- | cut -d'"' -f4 | head --lines 1`
|
|
- http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
|
- rc=$?
|
|
- if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
|
- ocf_log err "Failed to connect to the OpenStack Nova API (nova-api): $rc and $http_code"
|
|
- return $OCF_NOT_RUNNING
|
|
- fi
|
|
+# if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
|
+# && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
+# token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
|
+# \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
|
+# -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
|
+# | cut -d'"' -f4 | head --lines 1`
|
|
+# http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
|
+# rc=$?
|
|
+# if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
|
+# ocf_log err "Failed to connect to the OpenStack Nova API (nova-api): $rc and $http_code"
|
|
+# return $OCF_NOT_RUNNING
|
|
+# fi
|
|
+# fi
|
|
+ #suppress the information displayed while checking detailed information about this specific version of the API
|
|
+ if [ -n "$OCF_RESKEY_os_username"] && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
|
+ ./validation $OCF_RESKEY_keystone_get_token_url $OCF_RESKEY_os_username $OCF_RESKEY_os_tenant_name
|
|
+ rc=$?
|
|
+ if [ $rc -ne 0 ]; then
|
|
+ ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
|
|
+ return $OCF_NOT_RUNNING
|
|
+ fi
|
|
fi
|
|
|
|
ocf_log debug "OpenStack Nova API (nova-api) monitor succeeded"
|
|
Index: git/ocf/validation
|
|
===================================================================
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
+++ git/ocf/validation 2014-09-23 10:06:37.011706573 -0400
|
|
@@ -0,0 +1,5 @@
|
|
+#!/usr/bin/env python
|
|
+
|
|
+from keystoneclient import probe
|
|
+
|
|
+probe.main()
|