From 786c22e2a884daaf7c9690147e602be8998c6fd2 Mon Sep 17 00:00:00 2001 From: Sun Austin Date: Wed, 30 Jan 2019 14:47:32 +0800 Subject: [PATCH] [Devstack] rename sysinv-agent and check sysinv services - rename sysinv-agent to sysinv-agent.sh to avoid overwrite entry_point for sysinv-agent - check sysinv services status once services are started Change-Id: I58944452ca6cc9b3b6a5d4959b34c7b84c6d58f3 Signed-off-by: Sun Austin --- devstack/lib/stx-config | 13 ++++++++++++- devstack/plugin.sh | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/devstack/lib/stx-config b/devstack/lib/stx-config index 489c374997..e8d261913a 100644 --- a/devstack/lib/stx-config +++ b/devstack/lib/stx-config @@ -60,6 +60,16 @@ function cleanup_sysinv { sudo rm -rf $SYSINV_AUTHO_CACHE_DIR $SYSINV_CONF_DIR } +stx_services="sysinv-api sysinv-cond sysinv-agent" +function check_sysinv_services { + local service + for service in $stx_services; do + if $SYSTEMCTL is-enabled devstack@$service.service; then + $SYSTEMCTL status devstack@$service.service --no-pager + fi + done +} + function configure_sysinv { sudo install -d -o $STACK_USER $SYSINV_CONF_DIR cp $SYSINV_DIR/etc/sysinv/sysinv.conf.sample $SYSINV_CONF_FILE @@ -195,7 +205,8 @@ function install_sysinv { } function install_sysinv_agent { - sudo install -p -D -m 755 $SYSINV_AGENT_DIR/sysinv-agent $SYSINV_BIN_DIR/sysinv-agent + #rename to sysinv-agent.sh to avoid overwrite entry_point of sysinv-agent + sudo install -p -D -m 755 $SYSINV_AGENT_DIR/sysinv-agent $SYSINV_BIN_DIR/sysinv-agent.sh } function install_sysinv_depends { diff --git a/devstack/plugin.sh b/devstack/plugin.sh index ccc03c1e30..f6c75a50f8 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -29,6 +29,9 @@ if is_service_enabled stx-config; then elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then # do sanity test for sysinv echo_summary "do test-config" + # check sysinv services status + echo_summary "do check sysinv services" + check_sysinv_services fi if [[ "$1" == "unstack" ]]; then