Start-master/stop-master always fail if confd is disabled
authorJose A. Lopes <jabolopes@gmail.com>
Fri, 17 Jan 2014 00:43:43 +0000 (01:43 +0100)
committerJose A. Lopes <jabolopes@google.com>
Mon, 20 Jan 2014 09:44:07 +0000 (10:44 +0100)
In 'daemons/daemon-util.in', 'start-master' and 'stop-master' always
fail if confd is disabled.

Fixes issue 685.

Signed-off-by: Jose A. Lopes <jabolopes@gmail.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

daemons/daemon-util.in

index f1e5941..9497c60 100644 (file)
@@ -292,14 +292,20 @@ check_and_start() {
 start_master() {
   start ganeti-masterd
   start ganeti-rapi
-  _confd_enabled && start ganeti-luxid
+  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
-  _confd_enabled && stop ganeti-luxid
 }
 
 # Start all daemons