Commit 6b06efa7 authored by Petr Pudlak's avatar Petr Pudlak

Fix start/stop scripts to run luxid unconditionally

and update the unit check the list of daemons.
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 0cd5ab45
......@@ -31,6 +31,7 @@ DAEMONS=(
ganeti-noded
ganeti-masterd
ganeti-rapi
ganeti-luxid
)
_confd_enabled() {
......@@ -39,7 +40,6 @@ _confd_enabled() {
if _confd_enabled; then
DAEMONS+=( ganeti-confd )
DAEMONS+=( ganeti-luxid )
fi
_mond_enabled() {
......@@ -233,7 +233,7 @@ start() {
local usergroup=$(_daemon_usergroup $plain_name)
local daemonexec=$(_daemon_executable $name)
if ( [[ "$name" == ganeti-confd ]] || [[ "$name" == ganeti-luxid ]] ) \
if [[ "$name" == ganeti-confd ]] \
&& ! _confd_enabled; then
echo 'ganeti-confd disabled at build time' >&2
return 1
......@@ -292,18 +292,12 @@ check_and_start() {
start_master() {
start ganeti-masterd
start ganeti-rapi
if _confd_enabled; then
start ganeti-luxid
else
return 0
fi
start ganeti-luxid
}
# Stops the master role
stop_master() {
if _confd_enabled ; then
stop ganeti-luxid
fi
stop ganeti-luxid
stop ganeti-rapi
stop ganeti-masterd
}
......
......@@ -36,12 +36,12 @@ if ! grep -q '^ENABLE_MOND = ' lib/_constants.py; then
err "Please update $0, mond enable feature is missing"
fi
DAEMONS_LIST="noded masterd rapi"
STOPDAEMONS_LIST="rapi masterd noded"
DAEMONS_LIST="noded masterd rapi luxid"
STOPDAEMONS_LIST="luxid rapi masterd noded"
if grep -q '^ENABLE_CONFD = True' lib/_constants.py; then
DAEMONS_LIST="$DAEMONS_LIST confd luxid"
STOPDAEMONS_LIST="luxid confd $STOPDAEMONS_LIST"
DAEMONS_LIST="$DAEMONS_LIST confd"
STOPDAEMONS_LIST="confd $STOPDAEMONS_LIST"
fi
if grep -q '^ENABLE_MOND = True' lib/_constants.py; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment