Browse code

Restart only nova-compute when deploying Ironic

lib/ironic redundantly restarts *all* Nova services as part of its bootstrap.
Only nova-compute should be restarted to ensure its resource tracker has picked
up newly enlisted Ironic nodes. This change limits the restart to only
nova-compute and triggers it after nodes have been enlisted in Ironic.

Change-Id: I87a508d6611a16fa6b966ab18e15aa9fbcc5e8c7

Adam Gandelman authored on 2014/04/09 03:52:05
Showing 1 changed files
... ...
@@ -496,19 +496,6 @@ function prepare_baremetal_basic_ops {
496 496
         fi
497 497
     done
498 498
 
499
-    SCREEN_NAME=${SCREEN_NAME:-stack}
500
-    SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
501
-
502
-    # stop all nova services
503
-    stop_nova || true
504
-
505
-    # remove any nova services failure status
506
-    find $SERVICE_DIR/$SCREEN_NAME -name 'n-*.failure' -exec rm -f '{}' \;
507
-
508
-    # start them again
509
-    start_nova_api
510
-    start_nova
511
-
512 499
     TOKEN=$(keystone token-get | grep ' id ' | get_field 2)
513 500
     die_if_not_set $LINENO TOKEN "Keystone fail to get token"
514 501
 
... ...
@@ -520,6 +507,11 @@ function prepare_baremetal_basic_ops {
520 520
     create_bridge_and_vms
521 521
     enroll_vms
522 522
     configure_tftpd
523
+
524
+    # restart nova-compute to ensure its resource tracking is up to
525
+    # date with newly enrolled nodes
526
+    stop_nova_compute || true
527
+    start_nova_compute
523 528
 }
524 529
 
525 530
 function cleanup_baremetal_basic_ops {