[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 <austin.sun@intel.com>
This commit is contained in:
Sun Austin 2019-01-30 14:47:32 +08:00
parent 04cd68988f
commit 786c22e2a8
2 changed files with 15 additions and 1 deletions

View File

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

View File

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