From 767b5a45b7c6a91a449e0cb41baf16221a7de5e1 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Wed, 12 Mar 2014 10:33:15 -0700 Subject: [PATCH] Split up stop_nova to match start_nova Split stop_nova into: stop_nova_compute and stop_nova_rest. This is needed to support the partial-ncpu grenade test where we want to stop everything but nova_compute. Change-Id: I6a21821277e56897d705ca5746806e2211632d12 --- lib/nova | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/nova b/lib/nova index 55103e8dcc..15f56d336b 100644 --- a/lib/nova +++ b/lib/nova @@ -715,17 +715,25 @@ function start_nova { start_nova_rest } -# stop_nova() - Stop running processes (non-screen) -function stop_nova { +function stop_nova_compute { + if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then + stop_nova_hypervisor + fi +} + +function stop_nova_rest { # Kill the nova screen windows # Some services are listed here twice since more than one instance # of a service may be running in certain configs. for serv in n-api n-cpu n-crt n-net n-sch n-novnc n-xvnc n-cauth n-spice n-cond n-cell n-cell n-api-meta n-obj; do screen_stop $serv done - if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then - stop_nova_hypervisor - fi +} + +# stop_nova() - Stop running processes (non-screen) +function stop_nova { + stop_nova_rest + stop_nova_compute }