From 5f060e62f756e89f2988c7fc4cc385beccdf6514 Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Tue, 8 Apr 2014 11:52:05 -0700 Subject: [PATCH] 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 --- lib/ironic | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/lib/ironic b/lib/ironic index 979420f2cb..3308791b5b 100644 --- a/lib/ironic +++ b/lib/ironic @@ -496,19 +496,6 @@ function prepare_baremetal_basic_ops { fi done - SCREEN_NAME=${SCREEN_NAME:-stack} - SERVICE_DIR=${SERVICE_DIR:-${DEST}/status} - - # stop all nova services - stop_nova || true - - # remove any nova services failure status - find $SERVICE_DIR/$SCREEN_NAME -name 'n-*.failure' -exec rm -f '{}' \; - - # start them again - start_nova_api - start_nova - TOKEN=$(keystone token-get | grep ' id ' | get_field 2) die_if_not_set $LINENO TOKEN "Keystone fail to get token" @@ -520,6 +507,11 @@ function prepare_baremetal_basic_ops { create_bridge_and_vms enroll_vms configure_tftpd + + # restart nova-compute to ensure its resource tracking is up to + # date with newly enrolled nodes + stop_nova_compute || true + start_nova_compute } function cleanup_baremetal_basic_ops {