Implement screen process stop() function
Implements screen process stop in ceilometer, cinder, glance, heat, n-vol
Change-Id: Ic5e02926f026d0e6f4b39846bfe77634dd414c60
diff --git a/lib/ceilometer b/lib/ceilometer
index 0208753..972621d 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -72,5 +72,13 @@
screen_it ceilometer-api "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR"
}
+# stop_ceilometer() - Stop running processes
+function stop_ceilometer() {
+ # Kill the ceilometer screen windows
+ for serv in ceilometer-acompute ceilometer-acentral ceilometer-collector ceilometer-api; do
+ screen -S $SCREEN_NAME -p $serv -X kill
+ done
+}
+
# Restore xtrace
$XTRACE
diff --git a/lib/cinder b/lib/cinder
index de2debc..14c2df8 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -225,9 +225,12 @@
screen_it c-sch "cd $CINDER_DIR && $CINDER_BIN_DIR/cinder-scheduler --config-file $CINDER_CONF"
}
-# stop_cinder() - Stop running processes (non-screen)
+# stop_cinder() - Stop running processes
function stop_cinder() {
- # FIXME(dtroyer): stop only the cinder screen window?
+ # Kill the cinder screen windows
+ for serv in c-api c-sch c-vol; do
+ screen -S $SCREEN_NAME -p $serv -X kill
+ done
if is_service_enabled c-vol; then
stop_service tgt
diff --git a/lib/glance b/lib/glance
index 44990f1..4cc6253 100644
--- a/lib/glance
+++ b/lib/glance
@@ -169,7 +169,7 @@
fi
}
-# stop_glance() - Stop running processes (non-screen)
+# stop_glance() - Stop running processes
function stop_glance() {
# Kill the Glance screen windows
screen -S $SCREEN_NAME -p g-api -X kill
diff --git a/lib/heat b/lib/heat
index e713b39..6e823f2 100644
--- a/lib/heat
+++ b/lib/heat
@@ -173,10 +173,12 @@
screen_it h-meta "cd $HEAT_DIR; bin/heat-metadata --config-dir=$HEAT_CONF_DIR/heat-metadata.conf"
}
-# stop_heat() - Stop running processes (non-screen)
+# stop_heat() - Stop running processes
function stop_heat() {
- # This function intentionally left blank
- :
+ # Kill the cinder screen windows
+ for serv in h-eng h-api-cfn h-api-cw h-meta; do
+ screen -S $SCREEN_NAME -p $serv -X kill
+ done
}
# Restore xtrace
diff --git a/lib/n-vol b/lib/n-vol
index cc669cb..db53582 100644
--- a/lib/n-vol
+++ b/lib/n-vol
@@ -114,9 +114,10 @@
screen_it n-vol "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-volume"
}
-# stop_nvol() - Stop running processes (non-screen)
+# stop_nvol() - Stop running processes
function stop_nvol() {
- # FIXME(dtroyer): stop only the n-vol screen window?
+ # Kill the nova volume screen window
+ screen -S $SCREEN_NAME -p n-vol -X kill
stop_service tgt
}