Skip to content

Commit 0e03be8

Browse files
author
Marcio Silva
committed
Changes on a fork from Martin Loschwitiz's (Hastexo) repository on GitHub
1) Small changes to allow all resource agent scripts to be called from a bash prompt 2) Changes to make keystone deployable in active/active mode. 3) Added nova-compute and nova-conductor to the list of resource agents.
1 parent 9b9b934 commit 0e03be8

21 files changed

+830
-26
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.externalToolBuilders/
2+
.project

ocf/ceilometer-agent-central

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
1212
# License: Apache Software License (ASL) 2.0
1313
#
14+
# Small changes made by [email protected] to allow it be executed directly
15+
# from a bash prompt.
1416
#
1517
# See usage() function below for more details ...
1618
#
@@ -24,7 +26,7 @@
2426
# OCF_RESKEY_additional_parameters
2527
#######################################################################
2628
# Initialization:
27-
29+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
2830
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
2931
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3032

ocf/cinder-api

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
1212
# License: Apache Software License (ASL) 2.0
1313
#
14+
# Small changes made by [email protected] to allow it be executed directly
15+
# from a bash prompt.
1416
#
1517
# See usage() function below for more details ...
1618
#
@@ -26,7 +28,7 @@
2628
# OCF_RESKEY_additional_parameters
2729
#######################################################################
2830
# Initialization:
29-
31+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
3032
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
3133
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3234

ocf/cinder-schedule

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
1212
# License: Apache Software License (ASL) 2.0
1313
#
14+
# Small changes made by [email protected] to allow it be executed directly
15+
# from a bash prompt.
1416
#
1517
# See usage() function below for more details ...
1618
#
@@ -24,7 +26,7 @@
2426
# OCF_RESKEY_additional_parameters
2527
#######################################################################
2628
# Initialization:
27-
29+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
2830
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
2931
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3032

ocf/cinder-volume

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
#
66
# Description: Manages an OpenStack Volumes (cinder-volume) process as an HA resource
77
#
8-
# Authors: Sébastien Han
8+
# Authors: Sebastien Han
99
# Mainly inspired by the Glance API resource agent written by Martin Gerhard Loschwitz from Hastexo: http://goo.gl/whLpr
1010
#
1111
1212
# License: Apache Software License (ASL) 2.0
1313
#
14+
# Small changes made by [email protected] to allow it be executed directly
15+
# from a bash prompt.
1416
#
1517
# See usage() function below for more details ...
1618
#
@@ -23,7 +25,7 @@
2325
# OCF_RESKEY_additional_parameters
2426
#######################################################################
2527
# Initialization:
26-
28+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
2729
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
2830
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
2931

ocf/glance-api

+14-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#
1313
# (c) 2012 hastexo Professional Services GmbH
1414
#
15+
# Small changes made by [email protected] to allow it be executed directly
16+
# from a bash prompt.
17+
#
1518
# See usage() function below for more details ...
1619
#
1720
# OCF instance parameters:
@@ -22,12 +25,13 @@
2225
# OCF_RESKEY_os_password
2326
# OCF_RESKEY_os_tenant_name
2427
# OCF_RESKEY_os_auth_url
28+
# OCF_RESKEY_os_image_url
2529
# OCF_RESKEY_user
2630
# OCF_RESKEY_pid
2731
# OCF_RESKEY_additional_parameters
2832
#######################################################################
2933
# Initialization:
30-
34+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
3135
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
3236
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3337

@@ -144,6 +148,14 @@ The URL pointing to this ImageService (glance-api) instance to use when logging
144148
<content type="string" />
145149
</parameter>
146150
151+
<parameter name="os_image_url" unique="0" required="0">
152+
<longdesc lang="en">
153+
The URL pointing to this particular local instance of glance-api
154+
</longdesc>
155+
<shortdesc lang="en">ImageService (glance-api) URL for monitoring login</shortdesc>
156+
<content type="string" />
157+
</parameter>
158+
147159
<parameter name="client_binary" unique="0" required="0">
148160
<longdesc lang="en">
149161
Location of the OpenStack ImageService client binary (glance)
@@ -243,6 +255,7 @@ glance_api_monitor() {
243255
--os_password "$OCF_RESKEY_os_password" \
244256
--os_tenant_name "$OCF_RESKEY_os_tenant_name" \
245257
--os_auth_url "$OCF_RESKEY_os_auth_url" \
258+
--os-image-url "$OCF_RESKEY_os_image_url" \
246259
index > /dev/null 2>&1
247260
rc=$?
248261
if [ $rc -ne 0 ]; then

ocf/glance-registry

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#
1313
# (c) 2012 hastexo Professional Services GmbH
1414
#
15+
# Small changes made by [email protected] to allow it be executed directly
16+
# from a bash prompt.
17+
#
1518
# See usage() function below for more details ...
1619
#
1720
# OCF instance parameters:
@@ -27,7 +30,7 @@
2730
# OCF_RESKEY_additional_parameters
2831
#######################################################################
2932
# Initialization:
30-
33+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
3134
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
3235
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3336

ocf/heat-engine

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
1111
# License: Apache Software License (ASL) 2.0
1212
#
13+
# Small changes made by [email protected] to allow it be executed directly
14+
# from a bash prompt.
1315
#
1416
# See usage() function below for more details ...
1517
#
@@ -24,7 +26,7 @@
2426
# OCF_RESKEY_additional_parameters
2527
#######################################################################
2628
# Initialization:
27-
29+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
2830
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
2931
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3032

ocf/keystone

+26-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
#
1313
# (c) 2012 hastexo Professional Services GmbH
1414
#
15+
# Small changes made by [email protected] to:
16+
# a) allow it be executed directly
17+
# b) allow keystone to be deployed on active/active mode.
18+
#
1519
# See usage() function below for more details ...
1620
#
1721
# OCF instance parameters:
@@ -22,12 +26,14 @@
2226
# OCF_RESKEY_os_password
2327
# OCF_RESKEY_os_tenant_name
2428
# OCF_RESKEY_os_auth_url
29+
# OCF_RESKEY_os_endpoint
30+
# OCF_RESKEY_os_token
2531
# OCF_RESKEY_user
2632
# OCF_RESKEY_pid
2733
# OCF_RESKEY_additional_parameters
2834
#######################################################################
2935
# Initialization:
30-
36+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
3137
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
3238
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3339

@@ -130,7 +136,23 @@ The tenant to use when logging into Keystone for monitoring purposes
130136
131137
<parameter name="os_auth_url" unique="0" required="0">
132138
<longdesc lang="en">
133-
The URL pointing to this Keystone instance to use when logging in for monitoring purposes
139+
The AUTH URL pointing to this Keystone instance to use when logging in for monitoring purposes
140+
</longdesc>
141+
<shortdesc lang="en">Keystone URL for monitoring login</shortdesc>
142+
<content type="string" />
143+
</parameter>
144+
145+
<parameter name="os_endpoint" unique="0" required="0">
146+
<longdesc lang="en">
147+
The ENDPOINT URL pointing to this Keystone instance to use when logging in for monitoring purposes
148+
</longdesc>
149+
<shortdesc lang="en">Keystone URL for monitoring login</shortdesc>
150+
<content type="string" />
151+
</parameter>
152+
153+
<parameter name="os_token" unique="0" required="0">
154+
<longdesc lang="en">
155+
The SERVICE token to use when logging in for monitoring purposes
134156
</longdesc>
135157
<shortdesc lang="en">Keystone URL for monitoring login</shortdesc>
136158
<content type="string" />
@@ -245,6 +267,8 @@ keystone_monitor() {
245267
--os-password "$OCF_RESKEY_os_password" \
246268
--os-tenant-name "$OCF_RESKEY_os_tenant_name" \
247269
--os-auth-url "$OCF_RESKEY_os_auth_url" \
270+
--os-endpoint "$OCF_RESKEY_os_endpoint" \
271+
--os-token "$OCF_RESKEY_os_token" \
248272
user-list > /dev/null 2>&1
249273
rc=$?
250274
if [ $rc -ne 0 ]; then

ocf/neutron-agent-dhcp

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
1212
# License: Apache Software License (ASL) 2.0
1313
#
14+
# Small changes made by [email protected] to allow it be executed directly
15+
# from a bash prompt.
1416
#
1517
# See usage() function below for more details ...
1618
#
@@ -24,7 +26,7 @@
2426
# OCF_RESKEY_additional_parameters
2527
#######################################################################
2628
# Initialization:
27-
29+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
2830
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
2931
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3032

ocf/neutron-agent-l3

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
1212
# License: Apache Software License (ASL) 2.0
1313
#
14+
# Small changes made by [email protected] to allow it be executed directly
15+
# from a bash prompt.
1416
#
1517
# See usage() function below for more details ...
1618
#
@@ -24,7 +26,7 @@
2426
# OCF_RESKEY_additional_parameters
2527
#######################################################################
2628
# Initialization:
27-
29+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
2830
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
2931
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3032

ocf/neutron-metadata-agent

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
#
66
# Description: Manages an OpenStack Volumes (neutron-metadata-agent) process as an HA resource
77
#
8-
# Authors: Sébastien Han
8+
# Authors: Sebastien Han
99
# Mainly inspired by the Glance API resource agent written by Martin Gerhard Loschwitz from Hastexo: http://goo.gl/whLpr
1010
#
1111
1212
# License: Apache Software License (ASL) 2.0
1313
#
14+
# Small changes made by [email protected] to allow it be executed directly
15+
# from a bash prompt.
1416
#
1517
# See usage() function below for more details ...
1618
#
@@ -23,7 +25,7 @@
2325
# OCF_RESKEY_additional_parameters
2426
#######################################################################
2527
# Initialization:
26-
28+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
2729
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
2830
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
2931

ocf/neutron-server

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
1313
# License: Apache Software License (ASL) 2.0
1414
#
15+
# Small changes made by [email protected] to allow it be executed directly
16+
# from a bash prompt.
1517
#
1618
# See usage() function below for more details ...
1719
#
@@ -28,7 +30,7 @@
2830
# OCF_RESKEY_additional_parameters
2931
#######################################################################
3032
# Initialization:
31-
33+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
3234
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
3335
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3436

ocf/nova-api

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
#
66
# Description: Manages an OpenStack Nova API (nova-api) process as an HA resource
77
#
8-
# Authors: Sébastien Han
8+
# Authors: Sebastien Han
99
# Mainly inspired by the Glance API resource agent written by Martin Gerhard Loschwitz from Hastexo: http://goo.gl/whLpr
1010
#
1111
1212
# License: Apache Software License (ASL) 2.0
1313
#
14+
# Small changes made by [email protected] to allow it be executed directly
15+
# from a bash prompt.
1416
#
1517
# See usage() function below for more details ...
1618
#
@@ -26,7 +28,7 @@
2628
# OCF_RESKEY_additional_parameters
2729
#######################################################################
2830
# Initialization:
29-
31+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
3032
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
3133
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3234

ocf/nova-cert

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
#
66
# Description: Manages an OpenStack Nova Cert (nova-cert) process as an HA resource
77
#
8-
# Authors: Sébastien Han
8+
# Authors: Sebastien Han
99
# Mainly inspired by the Glance API resource agent written by Martin Gerhard Loschwitz from Hastexo: http://goo.gl/whLpr
1010
#
1111
1212
# License: Apache Software License (ASL) 2.0
1313
#
14+
# Small changes made by [email protected] to allow it be executed directly
15+
# from a bash prompt.
1416
#
1517
# See usage() function below for more details ...
1618
#
@@ -25,7 +27,7 @@
2527
# OCF_RESKEY_additional_parameters
2628
#######################################################################
2729
# Initialization:
28-
30+
OCF_ROOT=${OCF_ROOT:-/usr/lib/ocf}
2931
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
3032
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
3133

0 commit comments

Comments
 (0)