Browse Source

Fix bashate E003 violations

This commit fixes bashate E003 (indents are a multiple of 4 spaces)
violations in the OCF scripts.

Partial-Bug: #1550203
Change-Id: I6fbc935bd5f9b383ca97c45f2dd89d7d33a5780f
Signed-off-by: Norbert Illes <norbert.e.illes@ericsson.com>
Norbert Illes 3 years ago
parent
commit
173a77cec8
19 changed files with 555 additions and 271 deletions
  1. 27
    13
      ocf/ceilometer-agent-central
  2. 31
    16
      ocf/cinder-api
  3. 28
    13
      ocf/cinder-schedule
  4. 45
    30
      ocf/cinder-volume
  5. 28
    13
      ocf/glance-api
  6. 31
    16
      ocf/glance-registry
  7. 28
    13
      ocf/heat-engine
  8. 28
    13
      ocf/keystone
  9. 29
    14
      ocf/neutron-agent-dhcp
  10. 29
    14
      ocf/neutron-agent-l3
  11. 26
    11
      ocf/neutron-ha-tool
  12. 27
    12
      ocf/neutron-metadata-agent
  13. 27
    12
      ocf/neutron-server
  14. 31
    16
      ocf/nova-api
  15. 28
    13
      ocf/nova-cert
  16. 28
    13
      ocf/nova-consoleauth
  17. 28
    13
      ocf/nova-network
  18. 28
    13
      ocf/nova-novnc
  19. 28
    13
      ocf/nova-scheduler

+ 27
- 13
ocf/ceilometer-agent-central View File

@@ -250,7 +250,7 @@ ceilometer_agent_central_start() {
250 250
     # run the actual ceilometer-agent-central daemon. Don't use ocf_run as we're sending the tool's output
251 251
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
252 252
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
253
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
253
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
254 254
 
255 255
     # Spin waiting for the server to come up.
256 256
     while true; do
@@ -310,7 +310,7 @@ ceilometer_agent_central_stop() {
310 310
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
311 311
         # SIGTERM didn't help either, try SIGKILL
312 312
         ocf_log info "OpenStack Ceilometer Central Agent (ceilometer-agent-central) failed to stop after ${shutdown_timeout}s \
313
-          using SIGTERM. Trying SIGKILL ..."
313
+            using SIGTERM. Trying SIGKILL ..."
314 314
         ocf_run kill -s KILL $pid
315 315
     fi
316 316
 
@@ -324,10 +324,13 @@ ceilometer_agent_central_stop() {
324 324
 #######################################################################
325 325
 
326 326
 case "$1" in
327
-  meta-data) meta_data
328
-                exit $OCF_SUCCESS;;
329
-  usage|help) usage
330
-                exit $OCF_SUCCESS;;
327
+    meta-data)
328
+        meta_data
329
+        exit $OCF_SUCCESS
330
+        ;;
331
+    usage|help) usage
332
+        exit $OCF_SUCCESS
333
+        ;;
331 334
 esac
332 335
 
333 336
 # Anything except meta-data and help must pass validation
@@ -335,11 +338,22 @@ ceilometer_agent_central_validate || exit $?
335 338
 
336 339
 # What kind of method was invoked?
337 340
 case "$1" in
338
-  start) ceilometer_agent_central_start;;
339
-  stop) ceilometer_agent_central_stop;;
340
-  status) ceilometer_agent_central_status;;
341
-  monitor) ceilometer_agent_central_monitor;;
342
-  validate-all) ;;
343
-  *) usage
344
-                exit $OCF_ERR_UNIMPLEMENTED;;
341
+    start)
342
+        ceilometer_agent_central_start
343
+        ;;
344
+    stop)
345
+        ceilometer_agent_central_stop
346
+        ;;
347
+    status)
348
+        ceilometer_agent_central_status
349
+        ;;
350
+    monitor)
351
+        ceilometer_agent_central_monitor
352
+        ;;
353
+    validate-all)
354
+        ;;
355
+    *)
356
+        usage
357
+        exit $OCF_ERR_UNIMPLEMENTED
358
+        ;;
345 359
 esac

+ 31
- 16
ocf/cinder-api View File

@@ -247,9 +247,9 @@ cinder_api_monitor() {
247 247
     if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
248 248
     && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
249 249
         token=`curl -s -d  "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
250
-          \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
251
-          -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
252
-          | cut -d'"' -f4 | head --lines 1`
250
+            \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
251
+            -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
252
+            | cut -d'"' -f4 | head --lines 1`
253 253
         http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
254 254
         rc=$?
255 255
         if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
@@ -275,7 +275,7 @@ cinder_api_start() {
275 275
     # run the actual cinder-api daemon. Don't use ocf_run as we're sending the tool's output
276 276
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
277 277
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
278
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
278
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
279 279
 
280 280
     # Spin waiting for the server to come up.
281 281
     # Let the CRM/LRM time us out if required
@@ -336,7 +336,7 @@ cinder_api_stop() {
336 336
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
337 337
         # SIGTERM didn't help either, try SIGKILL
338 338
         ocf_log info "OpenStack Cinder API (cinder-api) failed to stop after ${shutdown_timeout}s \
339
-          using SIGTERM. Trying SIGKILL ..."
339
+            using SIGTERM. Trying SIGKILL ..."
340 340
         ocf_run kill -s KILL $pid
341 341
     fi
342 342
 
@@ -350,10 +350,14 @@ cinder_api_stop() {
350 350
 #######################################################################
351 351
 
352 352
 case "$1" in
353
-  meta-data)    meta_data
354
-                exit $OCF_SUCCESS;;
355
-  usage|help)   usage
356
-                exit $OCF_SUCCESS;;
353
+    meta-data)
354
+        meta_data
355
+        exit $OCF_SUCCESS
356
+        ;;
357
+    usage|help)
358
+        usage
359
+        exit $OCF_SUCCESS
360
+        ;;
357 361
 esac
358 362
 
359 363
 # Anything except meta-data and help must pass validation
@@ -361,12 +365,23 @@ cinder_api_validate || exit $?
361 365
 
362 366
 # What kind of method was invoked?
363 367
 case "$1" in
364
-  start)        cinder_api_start;;
365
-  stop)         cinder_api_stop;;
366
-  status)       cinder_api_status;;
367
-  monitor)      cinder_api_monitor;;
368
-  validate-all) ;;
369
-  *)            usage
370
-                exit $OCF_ERR_UNIMPLEMENTED;;
368
+    start)
369
+        cinder_api_start
370
+        ;;
371
+    stop)
372
+        cinder_api_stop
373
+        ;;
374
+    status)
375
+        cinder_api_status
376
+        ;;
377
+    monitor)
378
+        cinder_api_monitor
379
+        ;;
380
+    validate-all)
381
+        ;;
382
+    *)
383
+        usage
384
+        exit $OCF_ERR_UNIMPLEMENTED
385
+        ;;
371 386
 esac
372 387
 

+ 28
- 13
ocf/cinder-schedule View File

@@ -250,7 +250,7 @@ cinder_scheduler_start() {
250 250
     # run the actual cinder-schedule daemon. Don't use ocf_run as we're sending the tool's output
251 251
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
252 252
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
253
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
253
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
254 254
 
255 255
     # Spin waiting for the server to come up.
256 256
     while true; do
@@ -310,7 +310,7 @@ cinder_scheduler_stop() {
310 310
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
311 311
         # SIGTERM didn't help either, try SIGKILL
312 312
         ocf_log info "OpenStack Cinder Scheduler (cinder-schedule) failed to stop after ${shutdown_timeout}s \
313
-          using SIGTERM. Trying SIGKILL ..."
313
+            using SIGTERM. Trying SIGKILL ..."
314 314
         ocf_run kill -s KILL $pid
315 315
     fi
316 316
 
@@ -324,10 +324,14 @@ cinder_scheduler_stop() {
324 324
 #######################################################################
325 325
 
326 326
 case "$1" in
327
-  meta-data) meta_data
328
-                exit $OCF_SUCCESS;;
329
-  usage|help) usage
330
-                exit $OCF_SUCCESS;;
327
+    meta-data)
328
+        meta_data
329
+        exit $OCF_SUCCESS
330
+        ;;
331
+    usage|help)
332
+        usage
333
+        exit $OCF_SUCCESS
334
+        ;;
331 335
 esac
332 336
 
333 337
 # Anything except meta-data and help must pass validation
@@ -335,11 +339,22 @@ cinder_scheduler_validate || exit $?
335 339
 
336 340
 # What kind of method was invoked?
337 341
 case "$1" in
338
-  start) cinder_scheduler_start;;
339
-  stop) cinder_scheduler_stop;;
340
-  status) cinder_scheduler_status;;
341
-  monitor) cinder_scheduler_monitor;;
342
-  validate-all) ;;
343
-  *) usage
344
-                exit $OCF_ERR_UNIMPLEMENTED;;
342
+    start)
343
+        cinder_scheduler_start
344
+        ;;
345
+    stop)
346
+        cinder_scheduler_stop
347
+        ;;
348
+    status)
349
+        cinder_scheduler_status
350
+        ;;
351
+    monitor)
352
+        cinder_scheduler_monitor
353
+        ;;
354
+    validate-all)
355
+        ;;
356
+    *)
357
+        usage
358
+        exit $OCF_ERR_UNIMPLEMENTED
359
+        ;;
345 360
 esac

+ 45
- 30
ocf/cinder-volume View File

@@ -215,26 +215,26 @@ cinder_volume_monitor() {
215 215
     pid=`cat $OCF_RESKEY_pid`
216 216
 
217 217
     if ocf_is_true "$OCF_RESKEY_multibackend"; then
218
-      # Grab the child's PIDs
219
-      for i in `ps -o pid --no-headers --ppid $pid`
220
-      do
221
-        volume_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$i" | grep -qs "ESTABLISHED"`
218
+        # Grab the child's PIDs
219
+        for i in `ps -o pid --no-headers --ppid $pid`
220
+        do
221
+            volume_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$i" | grep -qs "ESTABLISHED"`
222
+            rc=$?
223
+            if [ $rc -ne 0 ]; then
224
+                ocf_log err "This child process from Cinder Volume is not connected to the AMQP server: $rc"
225
+                return $OCF_NOT_RUNNING
226
+            fi
227
+        done
228
+    else
229
+        # Check the connections according to the PID
230
+        # We are sure to hit the scheduler process and not other nova process with the same connection behavior (for example nova-cert)
231
+        # check the connections according to the PID
232
+        volume_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$pid" | grep -qs "ESTABLISHED"`
222 233
         rc=$?
223 234
         if [ $rc -ne 0 ]; then
224
-          ocf_log err "This child process from Cinder Volume is not connected to the AMQP server: $rc"
225
-          return $OCF_NOT_RUNNING
235
+            ocf_log err "Cinder Volume is not connected to the AMQP server: $rc"
236
+            return $OCF_NOT_RUNNING
226 237
         fi
227
-      done
228
-    else
229
-      # Check the connections according to the PID
230
-      # We are sure to hit the scheduler process and not other nova process with the same connection behavior (for example nova-cert)
231
-      # check the connections according to the PID
232
-      volume_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$pid" | grep -qs "ESTABLISHED"`
233
-      rc=$?
234
-      if [ $rc -ne 0 ]; then
235
-          ocf_log err "Cinder Volume is not connected to the AMQP server: $rc"
236
-          return $OCF_NOT_RUNNING
237
-      fi
238 238
     fi
239 239
 
240 240
     ocf_log debug "OpenStack Cinder Volume (cinder-volume) monitor succeeded"
@@ -254,7 +254,7 @@ cinder_volume_start() {
254 254
     # run the actual cinder-volume daemon. Don't use ocf_run as we're sending the tool's output
255 255
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
256 256
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
257
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
257
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
258 258
 
259 259
     # Spin waiting for the server to come up.
260 260
     # Let the CRM/LRM time us out if required
@@ -315,7 +315,7 @@ cinder_volume_stop() {
315 315
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
316 316
         # SIGTERM didn't help either, try SIGKILL
317 317
         ocf_log info "OpenStack Cinder Volume (cinder-volume) failed to stop after ${shutdown_timeout}s \
318
-          using SIGTERM. Trying SIGKILL ..."
318
+            using SIGTERM. Trying SIGKILL ..."
319 319
         ocf_run kill -s KILL $pid
320 320
     fi
321 321
 
@@ -329,10 +329,14 @@ cinder_volume_stop() {
329 329
 #######################################################################
330 330
 
331 331
 case "$1" in
332
-  meta-data)    meta_data
333
-                exit $OCF_SUCCESS;;
334
-  usage|help)   usage
335
-                exit $OCF_SUCCESS;;
332
+    meta-data)
333
+        meta_data
334
+        exit $OCF_SUCCESS
335
+        ;;
336
+    usage|help)
337
+        usage
338
+        exit $OCF_SUCCESS
339
+        ;;
336 340
 esac
337 341
 
338 342
 # Anything except meta-data and help must pass validation
@@ -340,11 +344,22 @@ cinder_volume_validate || exit $?
340 344
 
341 345
 # What kind of method was invoked?
342 346
 case "$1" in
343
-  start)        cinder_volume_start;;
344
-  stop)         cinder_volume_stop;;
345
-  status)       cinder_volume_status;;
346
-  monitor)      cinder_volume_monitor;;
347
-  validate-all) ;;
348
-  *)            usage
349
-                exit $OCF_ERR_UNIMPLEMENTED;;
347
+    start)
348
+        cinder_volume_start
349
+        ;;
350
+    stop)
351
+        cinder_volume_stop
352
+        ;;
353
+    status)
354
+        cinder_volume_status
355
+        ;;
356
+    monitor)
357
+        cinder_volume_monitor
358
+        ;;
359
+    validate-all)
360
+        ;;
361
+    *)
362
+        usage
363
+        exit $OCF_ERR_UNIMPLEMENTED
364
+        ;;
350 365
 esac

+ 28
- 13
ocf/glance-api View File

@@ -268,7 +268,7 @@ glance_api_start() {
268 268
     # run the actual glance-api daemon. Don't use ocf_run as we're sending the tool's output
269 269
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
270 270
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file $OCF_RESKEY_config \
271
-      $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
271
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
272 272
 
273 273
     # Spin waiting for the server to come up.
274 274
     # Let the CRM/LRM time us out if required
@@ -329,7 +329,7 @@ glance_api_stop() {
329 329
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
330 330
         # SIGTERM didn't help either, try SIGKILL
331 331
         ocf_log info "OpenStack ImageService (glance-api) failed to stop after ${shutdown_timeout}s \
332
-          using SIGTERM. Trying SIGKILL ..."
332
+            using SIGTERM. Trying SIGKILL ..."
333 333
         ocf_run kill -s KILL $pid
334 334
     fi
335 335
 
@@ -343,10 +343,14 @@ glance_api_stop() {
343 343
 #######################################################################
344 344
 
345 345
 case "$1" in
346
-  meta-data)    meta_data
347
-                exit $OCF_SUCCESS;;
348
-  usage|help)   usage
349
-                exit $OCF_SUCCESS;;
346
+    meta-data)
347
+        meta_data
348
+        exit $OCF_SUCCESS
349
+        ;;
350
+    usage|help)
351
+        usage
352
+        exit $OCF_SUCCESS
353
+        ;;
350 354
 esac
351 355
 
352 356
 # Anything except meta-data and help must pass validation
@@ -354,11 +358,22 @@ glance_api_validate || exit $?
354 358
 
355 359
 # What kind of method was invoked?
356 360
 case "$1" in
357
-  start)        glance_api_start;;
358
-  stop)         glance_api_stop;;
359
-  status)       glance_api_status;;
360
-  monitor)      glance_api_monitor;;
361
-  validate-all) ;;
362
-  *)            usage
363
-                exit $OCF_ERR_UNIMPLEMENTED;;
361
+    start)
362
+        glance_api_start
363
+        ;;
364
+    stop)
365
+        glance_api_stop
366
+        ;;
367
+    status)
368
+        glance_api_status
369
+        ;;
370
+    monitor)
371
+        glance_api_monitor
372
+        ;;
373
+    validate-all)
374
+        ;;
375
+    *)
376
+        usage
377
+        exit $OCF_ERR_UNIMPLEMENTED
378
+        ;;
364 379
 esac

+ 31
- 16
ocf/glance-registry View File

@@ -249,9 +249,9 @@ glance_registry_monitor() {
249 249
     if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
250 250
     && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
251 251
         token=`curl -s -d  "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
252
-          \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
253
-          -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
254
-          | cut -d'"' -f4 | head --lines 1`
252
+            \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
253
+            -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
254
+            | cut -d'"' -f4 | head --lines 1`
255 255
         http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
256 256
         rc=$?
257 257
         if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
@@ -277,7 +277,7 @@ glance_registry_start() {
277 277
     # run the actual glance-registry daemon. Don't use ocf_run as we're sending the tool's output
278 278
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
279 279
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file $OCF_RESKEY_config \
280
-      $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
280
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
281 281
 
282 282
     # Spin waiting for the server to come up.
283 283
     # Let the CRM/LRM time us out if required
@@ -338,7 +338,7 @@ glance_registry_stop() {
338 338
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
339 339
         # SIGTERM didn't help either, try SIGKILL
340 340
         ocf_log info "OpenStack ImageService (glance-registry) failed to stop after ${shutdown_timeout}s \
341
-          using SIGTERM. Trying SIGKILL ..."
341
+            using SIGTERM. Trying SIGKILL ..."
342 342
         ocf_run kill -s KILL $pid
343 343
     fi
344 344
 
@@ -352,10 +352,14 @@ glance_registry_stop() {
352 352
 #######################################################################
353 353
 
354 354
 case "$1" in
355
-  meta-data)    meta_data
356
-                exit $OCF_SUCCESS;;
357
-  usage|help)   usage
358
-                exit $OCF_SUCCESS;;
355
+    meta-data)
356
+        meta_data
357
+        exit $OCF_SUCCESS
358
+        ;;
359
+    usage|help)
360
+        usage
361
+        exit $OCF_SUCCESS
362
+        ;;
359 363
 esac
360 364
 
361 365
 # Anything except meta-data and help must pass validation
@@ -363,11 +367,22 @@ glance_registry_validate || exit $?
363 367
 
364 368
 # What kind of method was invoked?
365 369
 case "$1" in
366
-  start)        glance_registry_start;;
367
-  stop)         glance_registry_stop;;
368
-  status)       glance_registry_status;;
369
-  monitor)      glance_registry_monitor;;
370
-  validate-all) ;;
371
-  *)            usage
372
-                exit $OCF_ERR_UNIMPLEMENTED;;
370
+    start)
371
+        glance_registry_start
372
+        ;;
373
+    stop)
374
+        glance_registry_stop
375
+        ;;
376
+    status)
377
+        glance_registry_status
378
+        ;;
379
+    monitor)
380
+        glance_registry_monitor
381
+        ;;
382
+    validate-all)
383
+        ;;
384
+    *)
385
+        usage
386
+        exit $OCF_ERR_UNIMPLEMENTED
387
+        ;;
373 388
 esac

+ 28
- 13
ocf/heat-engine View File

@@ -260,7 +260,7 @@ heat_engine_start() {
260 260
     # run the actual heat-engine daemon. Don't use ocf_run as we're sending the tool's output
261 261
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
262 262
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
263
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
263
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
264 264
 
265 265
     # Spin waiting for the server to come up.
266 266
     while true; do
@@ -320,7 +320,7 @@ heat_engine_stop() {
320 320
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
321 321
         # SIGTERM didn't help either, try SIGKILL
322 322
         ocf_log info "OpenStack Orchestration Engine (heat-engine) failed to stop after ${shutdown_timeout}s \
323
-          using SIGTERM. Trying SIGKILL ..."
323
+            using SIGTERM. Trying SIGKILL ..."
324 324
         ocf_run kill -s KILL $pid
325 325
     fi
326 326
 
@@ -334,10 +334,14 @@ heat_engine_stop() {
334 334
 #######################################################################
335 335
 
336 336
 case "$1" in
337
-  meta-data)    meta_data
338
-                exit $OCF_SUCCESS;;
339
-  usage|help)   usage
340
-                exit $OCF_SUCCESS;;
337
+    meta-data)
338
+        meta_data
339
+        exit $OCF_SUCCESS
340
+        ;;
341
+    usage|help)
342
+        usage
343
+        exit $OCF_SUCCESS
344
+        ;;
341 345
 esac
342 346
 
343 347
 # Anything except meta-data and help must pass validation
@@ -345,11 +349,22 @@ heat_engine_validate || exit $?
345 349
 
346 350
 # What kind of method was invoked?
347 351
 case "$1" in
348
-  start)        heat_engine_start;;
349
-  stop)         heat_engine_stop;;
350
-  status)       heat_engine_status;;
351
-  monitor)      heat_engine_monitor;;
352
-  validate-all) ;;
353
-  *)            usage
354
-                exit $OCF_ERR_UNIMPLEMENTED;;
352
+    start)
353
+        heat_engine_start
354
+        ;;
355
+    stop)
356
+        heat_engine_stop
357
+        ;;
358
+    status)
359
+        heat_engine_status
360
+        ;;
361
+    monitor)
362
+        heat_engine_monitor
363
+        ;;
364
+    validate-all)
365
+        ;;
366
+    *)
367
+        usage
368
+        exit $OCF_ERR_UNIMPLEMENTED
369
+        ;;
355 370
 esac

+ 28
- 13
ocf/keystone View File

@@ -270,7 +270,7 @@ keystone_start() {
270 270
     # run the actual keystone daemon. Don't use ocf_run as we're sending the tool's output
271 271
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
272 272
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file $OCF_RESKEY_config \
273
-      $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
273
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
274 274
 
275 275
     # Spin waiting for the server to come up.
276 276
     # Let the CRM/LRM time us out if required
@@ -331,7 +331,7 @@ keystone_stop() {
331 331
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
332 332
         # SIGTERM didn't help either, try SIGKILL
333 333
         ocf_log info "OpenStack Identity (Keystone) failed to stop after ${shutdown_timeout}s \
334
-          using SIGTERM. Trying SIGKILL ..."
334
+            using SIGTERM. Trying SIGKILL ..."
335 335
         ocf_run kill -s KILL $pid
336 336
     fi
337 337
 
@@ -345,10 +345,14 @@ keystone_stop() {
345 345
 #######################################################################
346 346
 
347 347
 case "$1" in
348
-  meta-data)    meta_data
349
-                exit $OCF_SUCCESS;;
350
-  usage|help)   usage
351
-                exit $OCF_SUCCESS;;
348
+    meta-data)
349
+        meta_data
350
+        exit $OCF_SUCCESS
351
+        ;;
352
+    usage|help)
353
+        usage
354
+        exit $OCF_SUCCESS
355
+        ;;
352 356
 esac
353 357
 
354 358
 # Anything except meta-data and help must pass validation
@@ -356,11 +360,22 @@ keystone_validate || exit $?
356 360
 
357 361
 # What kind of method was invoked?
358 362
 case "$1" in
359
-  start)        keystone_start;;
360
-  stop)         keystone_stop;;
361
-  status)       keystone_status;;
362
-  monitor)      keystone_monitor;;
363
-  validate-all) ;;
364
-  *)            usage
365
-                exit $OCF_ERR_UNIMPLEMENTED;;
363
+    start)
364
+        keystone_start
365
+        ;;
366
+    stop)
367
+        keystone_stop
368
+        ;;
369
+    status)
370
+        keystone_status
371
+        ;;
372
+    monitor)
373
+        keystone_monitor
374
+        ;;
375
+    validate-all)
376
+        ;;
377
+    *)
378
+        usage
379
+        exit $OCF_ERR_UNIMPLEMENTED
380
+        ;;
366 381
 esac

+ 29
- 14
ocf/neutron-agent-dhcp View File

@@ -241,8 +241,8 @@ neutron_dhcp_agent_start() {
241 241
     # run the actual neutron-dhcp-agent daemon. Don't use ocf_run as we're sending the tool's output
242 242
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
243 243
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
244
-       --config-file=$OCF_RESKEY_plugin_config --log-file=/var/log/neutron/dhcp-agent.log $OCF_RESKEY_additional_parameters"' >> \
245
-       /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
244
+        --config-file=$OCF_RESKEY_plugin_config --log-file=/var/log/neutron/dhcp-agent.log $OCF_RESKEY_additional_parameters"' >> \
245
+        /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
246 246
 
247 247
     # Spin waiting for the server to come up.
248 248
     # Let the CRM/LRM time us out if required
@@ -304,7 +304,7 @@ neutron_dhcp_agent_stop() {
304 304
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
305 305
         # SIGTERM didn't help either, try SIGKILL
306 306
         ocf_log info "OpenStack DHCP Server (neutron-dhcp-agent) failed to stop after ${shutdown_timeout}s \
307
-          using SIGTERM. Trying SIGKILL ..."
307
+            using SIGTERM. Trying SIGKILL ..."
308 308
         ocf_run kill -s KILL $pid
309 309
     fi
310 310
 
@@ -318,10 +318,14 @@ neutron_dhcp_agent_stop() {
318 318
 #######################################################################
319 319
 
320 320
 case "$1" in
321
-  meta-data)    meta_data
322
-                exit $OCF_SUCCESS;;
323
-  usage|help)   usage
324
-                exit $OCF_SUCCESS;;
321
+    meta-data)
322
+        meta_data
323
+        exit $OCF_SUCCESS
324
+        ;;
325
+    usage|help)
326
+        usage
327
+        exit $OCF_SUCCESS
328
+        ;;
325 329
 esac
326 330
 
327 331
 # Anything except meta-data and help must pass validation
@@ -329,11 +333,22 @@ neutron_dhcp_agent_validate || exit $?
329 333
 
330 334
 # What kind of method was invoked?
331 335
 case "$1" in
332
-  start)        neutron_dhcp_agent_start;;
333
-  stop)         neutron_dhcp_agent_stop;;
334
-  status)       neutron_dhcp_agent_status;;
335
-  monitor)      neutron_dhcp_agent_monitor;;
336
-  validate-all) ;;
337
-  *)            usage
338
-                exit $OCF_ERR_UNIMPLEMENTED;;
336
+    start)
337
+        neutron_dhcp_agent_start
338
+        ;;
339
+    stop)
340
+        neutron_dhcp_agent_stop
341
+        ;;
342
+    status)
343
+        neutron_dhcp_agent_status
344
+        ;;
345
+    monitor)
346
+        neutron_dhcp_agent_monitor
347
+        ;;
348
+    validate-all)
349
+        ;;
350
+    *)
351
+        usage
352
+        exit $OCF_ERR_UNIMPLEMENTED
353
+        ;;
339 354
 esac

+ 29
- 14
ocf/neutron-agent-l3 View File

@@ -243,8 +243,8 @@ neutron_l3_agent_start() {
243 243
     # run the actual neutron-l3-agent daemon. Don't use ocf_run as we're sending the tool's output
244 244
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
245 245
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
246
-       --config-file=$OCF_RESKEY_plugin_config --log-file=/var/log/neutron/l3-agent.log $OCF_RESKEY_additional_parameters"' >> \
247
-       /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
246
+        --config-file=$OCF_RESKEY_plugin_config --log-file=/var/log/neutron/l3-agent.log $OCF_RESKEY_additional_parameters"' >> \
247
+        /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
248 248
 
249 249
     # Spin waiting for the server to come up.
250 250
     # Let the CRM/LRM time us out if required
@@ -305,7 +305,7 @@ neutron_l3_agent_stop() {
305 305
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
306 306
         # SIGTERM didn't help either, try SIGKILL
307 307
         ocf_log info "OpenStack L3 Server (neutron-l3-agent) failed to stop after ${shutdown_timeout}s \
308
-          using SIGTERM. Trying SIGKILL ..."
308
+            using SIGTERM. Trying SIGKILL ..."
309 309
         ocf_run kill -s KILL $pid
310 310
     fi
311 311
 
@@ -319,10 +319,14 @@ neutron_l3_agent_stop() {
319 319
 #######################################################################
320 320
 
321 321
 case "$1" in
322
-  meta-data)    meta_data
323
-                exit $OCF_SUCCESS;;
324
-  usage|help)   usage
325
-                exit $OCF_SUCCESS;;
322
+    meta-data)
323
+        meta_data
324
+        exit $OCF_SUCCESS
325
+        ;;
326
+    usage|help)
327
+        usage
328
+        exit $OCF_SUCCESS
329
+        ;;
326 330
 esac
327 331
 
328 332
 # Anything except meta-data and help must pass validation
@@ -330,11 +334,22 @@ neutron_l3_agent_validate || exit $?
330 334
 
331 335
 # What kind of method was invoked?
332 336
 case "$1" in
333
-  start)        neutron_l3_agent_start;;
334
-  stop)         neutron_l3_agent_stop;;
335
-  status)       neutron_l3_agent_status;;
336
-  monitor)      neutron_l3_agent_monitor;;
337
-  validate-all) ;;
338
-  *)            usage
339
-                exit $OCF_ERR_UNIMPLEMENTED;;
337
+    start)
338
+        neutron_l3_agent_start
339
+        ;;
340
+    stop)
341
+        neutron_l3_agent_stop
342
+        ;;
343
+    status)
344
+        neutron_l3_agent_status
345
+        ;;
346
+    monitor)
347
+        neutron_l3_agent_monitor
348
+        ;;
349
+    validate-all)
350
+        ;;
351
+    *)
352
+        usage
353
+        exit $OCF_ERR_UNIMPLEMENTED
354
+        ;;
340 355
 esac

+ 26
- 11
ocf/neutron-ha-tool View File

@@ -230,10 +230,14 @@ neutron_ha_tool_stop() {
230 230
 #######################################################################
231 231
 
232 232
 case "$1" in
233
-  meta-data)    meta_data
234
-                exit $OCF_SUCCESS;;
235
-  usage|help)   usage
236
-                exit $OCF_SUCCESS;;
233
+    meta-data)
234
+        meta_data
235
+        exit $OCF_SUCCESS
236
+        ;;
237
+    usage|help)
238
+        usage
239
+        exit $OCF_SUCCESS
240
+        ;;
237 241
 esac
238 242
 
239 243
 # Anything except meta-data and help must pass validation
@@ -250,11 +254,22 @@ fi
250 254
 
251 255
 # What kind of method was invoked?
252 256
 case "$1" in
253
-  start)        neutron_ha_tool_start;;
254
-  stop)         neutron_ha_tool_stop;;
255
-  status)       neutron_ha_tool_status;;
256
-  monitor)      neutron_ha_tool_monitor;;
257
-  validate-all) ;;
258
-  *)            usage
259
-                exit $OCF_ERR_UNIMPLEMENTED;;
257
+    start)
258
+        neutron_ha_tool_start
259
+        ;;
260
+    stop)
261
+        neutron_ha_tool_stop
262
+        ;;
263
+    status)
264
+        neutron_ha_tool_status
265
+        ;;
266
+    monitor)
267
+        neutron_ha_tool_monitor
268
+        ;;
269
+    validate-all)
270
+        ;;
271
+    *)
272
+        usage
273
+        exit $OCF_ERR_UNIMPLEMENTED
274
+        ;;
260 275
 esac

+ 27
- 12
ocf/neutron-metadata-agent View File

@@ -294,7 +294,7 @@ neutron_metadata_agent_stop() {
294 294
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
295 295
         # SIGTERM didn't help either, try SIGKILL
296 296
         ocf_log info "OpenStack Neutron Metadata Agent (neutron-metadata-agent) failed to stop after ${shutdown_timeout}s \
297
-          using SIGTERM. Trying SIGKILL ..."
297
+            using SIGTERM. Trying SIGKILL ..."
298 298
         ocf_run kill -s KILL $pid
299 299
     fi
300 300
 
@@ -308,10 +308,14 @@ neutron_metadata_agent_stop() {
308 308
 #######################################################################
309 309
 
310 310
 case "$1" in
311
-  meta-data)    meta_data
312
-                exit $OCF_SUCCESS;;
313
-  usage|help)   usage
314
-                exit $OCF_SUCCESS;;
311
+    meta-data)
312
+        meta_data
313
+        exit $OCF_SUCCESS
314
+        ;;
315
+    usage|help)
316
+        usage
317
+        exit $OCF_SUCCESS
318
+        ;;
315 319
 esac
316 320
 
317 321
 # Anything except meta-data and help must pass validation
@@ -319,11 +323,22 @@ neutron_metadata_agent_validate || exit $?
319 323
 
320 324
 # What kind of method was invoked?
321 325
 case "$1" in
322
-  start)        neutron_metadata_agent_start;;
323
-  stop)         neutron_metadata_agent_stop;;
324
-  status)       neutron_metadata_agent_status;;
325
-  monitor)      neutron_metadata_agent_monitor;;
326
-  validate-all) ;;
327
-  *)            usage
328
-                exit $OCF_ERR_UNIMPLEMENTED;;
326
+    start)
327
+        neutron_metadata_agent_start
328
+        ;;
329
+    stop)
330
+        neutron_metadata_agent_stop
331
+        ;;
332
+    status)
333
+        neutron_metadata_agent_status
334
+        ;;
335
+    monitor)
336
+        neutron_metadata_agent_monitor
337
+        ;;
338
+    validate-all)
339
+        ;;
340
+    *)
341
+        usage
342
+        exit $OCF_ERR_UNIMPLEMENTED
343
+        ;;
329 344
 esac

+ 27
- 12
ocf/neutron-server View File

@@ -347,7 +347,7 @@ neutron_server_stop() {
347 347
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
348 348
         # SIGTERM didn't help either, try SIGKILL
349 349
         ocf_log info "OpenStack Neutron Server (neutron-server) failed to stop after ${shutdown_timeout}s \
350
-          using SIGTERM. Trying SIGKILL ..."
350
+            using SIGTERM. Trying SIGKILL ..."
351 351
         ocf_run kill -s KILL $pid
352 352
     fi
353 353
 
@@ -361,10 +361,14 @@ neutron_server_stop() {
361 361
 #######################################################################
362 362
 
363 363
 case "$1" in
364
-  meta-data)    meta_data
365
-                exit $OCF_SUCCESS;;
366
-  usage|help)   usage
367
-                exit $OCF_SUCCESS;;
364
+    meta-data)
365
+        meta_data
366
+        exit $OCF_SUCCESS
367
+        ;;
368
+    usage|help)
369
+        usage
370
+        exit $OCF_SUCCESS
371
+        ;;
368 372
 esac
369 373
 
370 374
 # Anything except meta-data and help must pass validation
@@ -372,11 +376,22 @@ neutron_server_validate || exit $?
372 376
 
373 377
 # What kind of method was invoked?
374 378
 case "$1" in
375
-  start)        neutron_server_start;;
376
-  stop)         neutron_server_stop;;
377
-  status)       neutron_server_status;;
378
-  monitor)      neutron_server_monitor;;
379
-  validate-all) ;;
380
-  *)            usage
381
-                exit $OCF_ERR_UNIMPLEMENTED;;
379
+    start)
380
+        neutron_server_start
381
+        ;;
382
+    stop)
383
+        neutron_server_stop
384
+        ;;
385
+    status)
386
+        neutron_server_status
387
+        ;;
388
+    monitor)
389
+        neutron_server_monitor
390
+        ;;
391
+    validate-all)
392
+        ;;
393
+    *)
394
+        usage
395
+        exit $OCF_ERR_UNIMPLEMENTED
396
+        ;;
382 397
 esac

+ 31
- 16
ocf/nova-api View File

@@ -247,9 +247,9 @@ nova_api_monitor() {
247 247
     if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
248 248
     && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
249 249
         token=`curl -s -d  "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
250
-          \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
251
-          -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
252
-          | cut -d'"' -f4 | head --lines 1`
250
+            \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
251
+            -H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
252
+            | cut -d'"' -f4 | head --lines 1`
253 253
         http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
254 254
         rc=$?
255 255
         if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
@@ -275,7 +275,7 @@ nova_api_start() {
275 275
     # run the actual nova-api daemon. Don't use ocf_run as we're sending the tool's output
276 276
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
277 277
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
278
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
278
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
279 279
 
280 280
     # Spin waiting for the server to come up.
281 281
     # Let the CRM/LRM time us out if required
@@ -336,7 +336,7 @@ nova_api_stop() {
336 336
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
337 337
         # SIGTERM didn't help either, try SIGKILL
338 338
         ocf_log info "OpenStack Nova API (nova-api) failed to stop after ${shutdown_timeout}s \
339
-          using SIGTERM. Trying SIGKILL ..."
339
+            using SIGTERM. Trying SIGKILL ..."
340 340
         ocf_run kill -s KILL $pid
341 341
     fi
342 342
 
@@ -350,10 +350,14 @@ nova_api_stop() {
350 350
 #######################################################################
351 351
 
352 352
 case "$1" in
353
-  meta-data)    meta_data
354
-                exit $OCF_SUCCESS;;
355
-  usage|help)   usage
356
-                exit $OCF_SUCCESS;;
353
+    meta-data)
354
+        meta_data
355
+        exit $OCF_SUCCESS
356
+        ;;
357
+    usage|help)
358
+        usage
359
+        exit $OCF_SUCCESS
360
+        ;;
357 361
 esac
358 362
 
359 363
 # Anything except meta-data and help must pass validation
@@ -361,12 +365,23 @@ nova_api_validate || exit $?
361 365
 
362 366
 # What kind of method was invoked?
363 367
 case "$1" in
364
-  start)        nova_api_start;;
365
-  stop)         nova_api_stop;;
366
-  status)       nova_api_status;;
367
-  monitor)      nova_api_monitor;;
368
-  validate-all) ;;
369
-  *)            usage
370
-                exit $OCF_ERR_UNIMPLEMENTED;;
368
+    start)
369
+        nova_api_start
370
+        ;;
371
+    stop)
372
+        nova_api_stop
373
+        ;;
374
+    status)
375
+        nova_api_status
376
+        ;;
377
+    monitor)
378
+        nova_api_monitor
379
+        ;;
380
+    validate-all)
381
+        ;;
382
+    *)
383
+        usage
384
+        exit $OCF_ERR_UNIMPLEMENTED
385
+        ;;
371 386
 esac
372 387
 

+ 28
- 13
ocf/nova-cert View File

@@ -288,7 +288,7 @@ nova_cert_start() {
288 288
     # run the actual nova-cert daemon. Don't use ocf_run as we're sending the tool's output
289 289
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
290 290
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
291
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
291
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
292 292
 
293 293
     # Spin waiting for the server to come up.
294 294
     # Let the CRM/LRM time us out if required
@@ -349,7 +349,7 @@ nova_cert_stop() {
349 349
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
350 350
         # SIGTERM didn't help either, try SIGKILL
351 351
         ocf_log info "OpenStack Nova Cert (nova-cert) failed to stop after ${shutdown_timeout}s \
352
-          using SIGTERM. Trying SIGKILL ..."
352
+            using SIGTERM. Trying SIGKILL ..."
353 353
         ocf_run kill -s KILL $pid
354 354
     fi
355 355
 
@@ -363,10 +363,14 @@ nova_cert_stop() {
363 363
 #######################################################################
364 364
 
365 365
 case "$1" in
366
-  meta-data)    meta_data
367
-                exit $OCF_SUCCESS;;
368
-  usage|help)   usage
369
-                exit $OCF_SUCCESS;;
366
+    meta-data)
367
+        meta_data
368
+        exit $OCF_SUCCESS
369
+        ;;
370
+    usage|help)
371
+        usage
372
+        exit $OCF_SUCCESS
373
+        ;;
370 374
 esac
371 375
 
372 376
 # Anything except meta-data and help must pass validation
@@ -374,12 +378,23 @@ nova_cert_validate || exit $?
374 378
 
375 379
 # What kind of method was invoked?
376 380
 case "$1" in
377
-  start)        nova_cert_start;;
378
-  stop)         nova_cert_stop;;
379
-  status)       nova_cert_status;;
380
-  monitor)      nova_cert_monitor;;
381
-  validate-all) ;;
382
-  *)            usage
383
-                exit $OCF_ERR_UNIMPLEMENTED;;
381
+    start)
382
+        nova_cert_start
383
+        ;;
384
+    stop)
385
+        nova_cert_stop
386
+        ;;
387
+    status)
388
+        nova_cert_status
389
+        ;;
390
+    monitor)
391
+        nova_cert_monitor
392
+        ;;
393
+    validate-all)
394
+        ;;
395
+    *)
396
+        usage
397
+        exit $OCF_ERR_UNIMPLEMENTED
398
+        ;;
384 399
 esac
385 400
 

+ 28
- 13
ocf/nova-consoleauth View File

@@ -288,7 +288,7 @@ nova_consoleauth_start() {
288 288
     # run the actual nova-consoleauth daemon. Don't use ocf_run as we're sending the tool's output
289 289
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
290 290
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
291
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
291
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
292 292
 
293 293
     # Spin waiting for the server to come up.
294 294
     # Let the CRM/LRM time us out if required
@@ -349,7 +349,7 @@ nova_consoleauth_stop() {
349 349
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
350 350
         # SIGTERM didn't help either, try SIGKILL
351 351
         ocf_log info "OpenStack Nova ConsoleAuth (nova-consoleauth) failed to stop after ${shutdown_timeout}s \
352
-          using SIGTERM. Trying SIGKILL ..."
352
+            using SIGTERM. Trying SIGKILL ..."
353 353
         ocf_run kill -s KILL $pid
354 354
     fi
355 355
 
@@ -363,10 +363,14 @@ nova_consoleauth_stop() {
363 363
 #######################################################################
364 364
 
365 365
 case "$1" in
366
-  meta-data)    meta_data
367
-                exit $OCF_SUCCESS;;
368
-  usage|help)   usage
369
-                exit $OCF_SUCCESS;;
366
+    meta-data)
367
+        meta_data
368
+        exit $OCF_SUCCESS
369
+        ;;
370
+    usage|help)
371
+        usage
372
+        exit $OCF_SUCCESS
373
+        ;;
370 374
 esac
371 375
 
372 376
 # Anything except meta-data and help must pass validation
@@ -374,12 +378,23 @@ nova_consoleauth_validate || exit $?
374 378
 
375 379
 # What kind of method was invoked?
376 380
 case "$1" in
377
-  start)        nova_consoleauth_start;;
378
-  stop)         nova_consoleauth_stop;;
379
-  status)       nova_consoleauth_status;;
380
-  monitor)      nova_consoleauth_monitor;;
381
-  validate-all) ;;
382
-  *)            usage
383
-                exit $OCF_ERR_UNIMPLEMENTED;;
381
+    start)
382
+        nova_consoleauth_start
383
+        ;;
384
+    stop)
385
+        nova_consoleauth_stop
386
+        ;;
387
+    status)
388
+        nova_consoleauth_status
389
+        ;;
390
+    monitor)
391
+        nova_consoleauth_monitor
392
+        ;;
393
+    validate-all)
394
+        ;;
395
+    *)
396
+        usage
397
+        exit $OCF_ERR_UNIMPLEMENTED
398
+        ;;
384 399
 esac
385 400
 

+ 28
- 13
ocf/nova-network View File

@@ -267,7 +267,7 @@ nova_network_start() {
267 267
     # run the actual nova-network daemon. Don't use ocf_run as we're sending the tool's output
268 268
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
269 269
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
270
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
270
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
271 271
 
272 272
     # Spin waiting for the server to come up.
273 273
     # Let the CRM/LRM time us out if required
@@ -329,7 +329,7 @@ nova_network_stop() {
329 329
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
330 330
         # SIGTERM didn't help either, try SIGKILL
331 331
         ocf_log info "OpenStack Nova Network (nova-network) failed to stop after ${shutdown_timeout}s \
332
-          using SIGTERM. Trying SIGKILL ..."
332
+            using SIGTERM. Trying SIGKILL ..."
333 333
         ocf_run kill -s KILL $pid
334 334
     fi
335 335
 
@@ -343,10 +343,14 @@ nova_network_stop() {
343 343
 #######################################################################
344 344
 
345 345
 case "$1" in
346
-  meta-data)    meta_data
347
-                exit $OCF_SUCCESS;;
348
-  usage|help)   usage
349
-                exit $OCF_SUCCESS;;
346
+    meta-data)
347
+        meta_data
348
+        exit $OCF_SUCCESS
349
+        ;;
350
+    usage|help)
351
+        usage
352
+        exit $OCF_SUCCESS
353
+        ;;
350 354
 esac
351 355
 
352 356
 # Anything except meta-data and help must pass validation
@@ -354,11 +358,22 @@ nova_network_validate || exit $?
354 358
 
355 359
 # What kind of method was invoked?
356 360
 case "$1" in
357
-  start)        nova_network_start;;
358
-  stop)         nova_network_stop;;
359
-  status)       nova_network_status;;
360
-  monitor)      nova_network_monitor;;
361
-  validate-all) ;;
362
-  *)            usage
363
-                exit $OCF_ERR_UNIMPLEMENTED;;
361
+    start)
362
+        nova_network_start
363
+        ;;
364
+    stop)
365
+        nova_network_stop
366
+        ;;
367
+    status)
368
+        nova_network_status
369
+        ;;
370
+    monitor)
371
+        nova_network_monitor
372
+        ;;
373
+    validate-all)
374
+        ;;
375
+    *)
376
+        usage
377
+        exit $OCF_ERR_UNIMPLEMENTED
378
+        ;;
364 379
 esac

+ 28
- 13
ocf/nova-novnc View File

@@ -237,7 +237,7 @@ nova_vnc_console_start() {
237 237
     # run the actual nova-novncproxy daemon. Don't use ocf_run as we're sending the tool's output
238 238
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
239 239
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config --web /usr/share/novnc/ \
240
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
240
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
241 241
 
242 242
     # Spin waiting for the server to come up.
243 243
     # Let the CRM/LRM time us out if required
@@ -298,7 +298,7 @@ nova_vnc_console_stop() {
298 298
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
299 299
         # SIGTERM didn't help either, try SIGKILL
300 300
         ocf_log info "OpenStack Nova VNC Console (nova-novncproxy) failed to stop after ${shutdown_timeout}s \
301
-          using SIGTERM. Trying SIGKILL ..."
301
+            using SIGTERM. Trying SIGKILL ..."
302 302
         ocf_run kill -s KILL $pid
303 303
     fi
304 304
 
@@ -312,10 +312,14 @@ nova_vnc_console_stop() {
312 312
 #######################################################################
313 313
 
314 314
 case "$1" in
315
-  meta-data)    meta_data
316
-                exit $OCF_SUCCESS;;
317
-  usage|help)   usage
318
-                exit $OCF_SUCCESS;;
315
+    meta-data)
316
+        meta_data
317
+        exit $OCF_SUCCESS
318
+        ;;
319
+    usage|help)
320
+        usage
321
+        exit $OCF_SUCCESS
322
+        ;;
319 323
 esac
320 324
 
321 325
 # Anything except meta-data and help must pass validation
@@ -323,12 +327,23 @@ nova_vnc_console_validate || exit $?
323 327
 
324 328
 # What kind of method was invoked?
325 329
 case "$1" in
326
-  start)        nova_vnc_console_start;;
327
-  stop)         nova_vnc_console_stop;;
328
-  status)       nova_vnc_console_status;;
329
-  monitor)      nova_vnc_console_monitor;;
330
-  validate-all) ;;
331
-  *)            usage
332
-                exit $OCF_ERR_UNIMPLEMENTED;;
330
+    start)
331
+        nova_vnc_console_start
332
+        ;;
333
+    stop)
334
+        nova_vnc_console_stop
335
+        ;;
336
+    status)
337
+        nova_vnc_console_status
338
+        ;;
339
+    monitor)
340
+        nova_vnc_console_monitor
341
+        ;;
342
+    validate-all)
343
+        ;;
344
+    *)
345
+        usage
346
+        exit $OCF_ERR_UNIMPLEMENTED
347
+        ;;
333 348
 esac
334 349
 

+ 28
- 13
ocf/nova-scheduler View File

@@ -287,7 +287,7 @@ nova_scheduler_start() {
287 287
     # run the actual nova-scheduler daemon. Don't use ocf_run as we're sending the tool's output
288 288
     # straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
289 289
     su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
290
-       $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
290
+        $OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
291 291
 
292 292
     # Spin waiting for the server to come up.
293 293
     while true; do
@@ -347,7 +347,7 @@ nova_scheduler_stop() {
347 347
     if [ $rc -ne $OCF_NOT_RUNNING ]; then
348 348
         # SIGTERM didn't help either, try SIGKILL
349 349
         ocf_log info "OpenStack Nova Scheduler (nova-scheduler) failed to stop after ${shutdown_timeout}s \
350
-          using SIGTERM. Trying SIGKILL ..."
350
+            using SIGTERM. Trying SIGKILL ..."
351 351
         ocf_run kill -s KILL $pid
352 352
     fi
353 353
 
@@ -361,10 +361,14 @@ nova_scheduler_stop() {
361 361
 #######################################################################
362 362
 
363 363
 case "$1" in
364
-  meta-data)    meta_data
365
-                exit $OCF_SUCCESS;;
366
-  usage|help)   usage
367
-                exit $OCF_SUCCESS;;
364
+    meta-data)
365
+        meta_data
366
+        exit $OCF_SUCCESS
367
+        ;;
368
+    usage|help)
369
+        usage
370
+        exit $OCF_SUCCESS
371
+        ;;
368 372
 esac
369 373
 
370 374
 # Anything except meta-data and help must pass validation
@@ -372,12 +376,23 @@ nova_scheduler_validate || exit $?
372 376
 
373 377
 # What kind of method was invoked?
374 378
 case "$1" in
375
-  start)        nova_scheduler_start;;
376
-  stop)         nova_scheduler_stop;;
377
-  status)       nova_scheduler_status;;
378
-  monitor)      nova_scheduler_monitor;;
379
-  validate-all) ;;
380
-  *)            usage
381
-                exit $OCF_ERR_UNIMPLEMENTED;;
379
+    start)
380
+        nova_scheduler_start
381
+        ;;
382
+    stop)
383
+        nova_scheduler_stop
384
+        ;;
385
+    status)
386
+        nova_scheduler_status
387
+        ;;
388
+    monitor)
389
+        nova_scheduler_monitor
390
+        ;;
391
+    validate-all)
392
+        ;;
393
+    *)
394
+        usage
395
+        exit $OCF_ERR_UNIMPLEMENTED
396
+        ;;
382 397
 esac
383 398
 

Loading…
Cancel
Save