if _confd_enabled; then
DAEMONS+=( ganeti-confd )
- DAEMONS+=( ganeti-queryd )
+ DAEMONS+=( ganeti-luxid )
fi
_mond_enabled() {
NODED_ARGS=
MASTERD_ARGS=
CONFD_ARGS=
-QUERYD_ARGS=
+LUXID_ARGS=
RAPI_ARGS=
MOND_ARGS=
echo "@GNTMASTERUSER@:@GNTMASTERDGROUP@"
;;
confd)
- echo "@GNTCONFDUSER@:@GNTDAEMONSGROUP@"
+ echo "@GNTCONFDUSER@:@GNTCONFDGROUP@"
;;
- queryd)
- echo "@GNTQUERYDUSER@:@GNTQUERYDGROUP@"
+ luxid)
+ echo "@GNTLUXIDUSER@:@GNTLUXIDGROUP@"
;;
rapi)
echo "@GNTRAPIUSER@:@GNTRAPIGROUP@"
;;
noded)
- echo "@GNTNODEDUSER@:@GNTDAEMONSGROUP@"
+ echo "@GNTNODEDUSER@:@GNTNODEDGROUP@"
;;
mond)
echo "@GNTMONDUSER@:@GNTMONDGROUP@"
local usergroup=$(_daemon_usergroup $plain_name)
local daemonexec=$(_daemon_executable $name)
- if ( [[ "$name" == ganeti-confd ]] || [[ "$name" == ganeti-queryd ]] ) \
+ if ( [[ "$name" == ganeti-confd ]] || [[ "$name" == ganeti-luxid ]] ) \
&& ! _confd_enabled; then
echo 'ganeti-confd disabled at build time' >&2
return 1
start_master() {
start ganeti-masterd
start ganeti-rapi
+ if _confd_enabled; then
+ start ganeti-luxid
+ else
+ return 0
+ fi
}
# Stops the master role
stop_master() {
+ if _confd_enabled ; then
+ stop ganeti-luxid
+ fi
stop ganeti-rapi
stop ganeti-masterd
}
done
}
+# SIGHUP a process to force re-opening its logfiles
+rotate_logs() {
+ if [[ "$#" -lt 1 ]]; then
+ echo 'Missing daemon name.' >&2
+ return 1
+ fi
+
+ local name="$1"; shift
+ local pidfile=$(_daemon_pidfile $name)
+ local daemonexec=$(_daemon_executable $name)
+
+ if type -p start-stop-daemon >/dev/null; then
+ start-stop-daemon --stop --signal HUP --quiet \
+ --oknodo --pidfile $pidfile
+ else
+ _ignore_error killproc \
+ -p $pidfile \
+ $daemonexec -HUP
+ fi
+}
+
+# SIGHUP all processes
+rotate_all_logs() {
+ for i in $(list_stop_daemons); do
+ rotate_logs $i
+ done
+}
+
# Reloads the SSH keys
reload_ssh_keys() {
@RPL_SSH_INITD_SCRIPT@ restart