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

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=( ...@@ -31,6 +31,7 @@ DAEMONS=(
ganeti-noded ganeti-noded
ganeti-masterd ganeti-masterd
ganeti-rapi ganeti-rapi
ganeti-luxid
) )
_confd_enabled() { _confd_enabled() {
...@@ -39,7 +40,6 @@ _confd_enabled() { ...@@ -39,7 +40,6 @@ _confd_enabled() {
if _confd_enabled; then if _confd_enabled; then
DAEMONS+=( ganeti-confd ) DAEMONS+=( ganeti-confd )
DAEMONS+=( ganeti-luxid )
fi fi
_mond_enabled() { _mond_enabled() {
...@@ -233,7 +233,7 @@ start() { ...@@ -233,7 +233,7 @@ start() {
local usergroup=$(_daemon_usergroup $plain_name) local usergroup=$(_daemon_usergroup $plain_name)
local daemonexec=$(_daemon_executable $name) local daemonexec=$(_daemon_executable $name)
if ( [[ "$name" == ganeti-confd ]] || [[ "$name" == ganeti-luxid ]] ) \ if [[ "$name" == ganeti-confd ]] \
&& ! _confd_enabled; then && ! _confd_enabled; then
echo 'ganeti-confd disabled at build time' >&2 echo 'ganeti-confd disabled at build time' >&2
return 1 return 1
...@@ -292,18 +292,12 @@ check_and_start() { ...@@ -292,18 +292,12 @@ check_and_start() {
start_master() { start_master() {
start ganeti-masterd start ganeti-masterd
start ganeti-rapi start ganeti-rapi
if _confd_enabled; then start ganeti-luxid
start ganeti-luxid
else
return 0
fi
} }
# Stops the master role # Stops the master role
stop_master() { stop_master() {
if _confd_enabled ; then stop ganeti-luxid
stop ganeti-luxid
fi
stop ganeti-rapi stop ganeti-rapi
stop ganeti-masterd stop ganeti-masterd
} }
......
...@@ -36,12 +36,12 @@ if ! grep -q '^ENABLE_MOND = ' lib/_constants.py; then ...@@ -36,12 +36,12 @@ if ! grep -q '^ENABLE_MOND = ' lib/_constants.py; then
err "Please update $0, mond enable feature is missing" err "Please update $0, mond enable feature is missing"
fi fi
DAEMONS_LIST="noded masterd rapi" DAEMONS_LIST="noded masterd rapi luxid"
STOPDAEMONS_LIST="rapi masterd noded" STOPDAEMONS_LIST="luxid rapi masterd noded"
if grep -q '^ENABLE_CONFD = True' lib/_constants.py; then if grep -q '^ENABLE_CONFD = True' lib/_constants.py; then
DAEMONS_LIST="$DAEMONS_LIST confd luxid" DAEMONS_LIST="$DAEMONS_LIST confd"
STOPDAEMONS_LIST="luxid confd $STOPDAEMONS_LIST" STOPDAEMONS_LIST="confd $STOPDAEMONS_LIST"
fi fi
if grep -q '^ENABLE_MOND = True' lib/_constants.py; then 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