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
This commit is contained in:
Adam Gandelman
2014-04-08 11:52:05 -07:00
parent c139a70fe2
commit 5f060e62f7

View File

@@ -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 {