Commit 2250afb3 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

daemon-util: Add function to start and stop all daemons

This is, to some degree, duplicated code from the init script. However,
the init script has to conform to standards of the underlying Linux
distributions, while these functions will be called by Ganeti itself. By
moving more code into daemon-util, the amount of duplication has been
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarRené Nussbaumer <>
parent 5d8acbdd
......@@ -185,6 +185,30 @@ stop_master() {
stop ganeti-masterd
# Start all daemons
start_all() {
for i in $(list_start_daemons); do
local rc=0
# Try to start daemon
start $i || rc=$?
if ! errmsg=$(check_exitcode $rc); then
echo "$errmsg" >&2
return 1
return 0
# Stop all daemons
stop_all() {
for i in $(list_stop_daemons); do
stop $i
# Reloads the SSH keys
reload_ssh_keys() {
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