Browse code

Merge "On Ubuntu: don't start Zookeeper twice"

Jenkins authored on 2015/11/11 22:32:02
Showing 1 changed files
... ...
@@ -69,7 +69,12 @@ function install_zookeeper {
69 69
 
70 70
 # start_zookeeper() - Start running processes, including screen
71 71
 function start_zookeeper {
72
-    start_service zookeeper
72
+    # Starting twice Zookeeper on Ubuntu exits with error code 1. See LP#1513741
73
+    # Match both systemd and sysvinit output
74
+    local running="(active \(running\)|start/running)"
75
+    if ! is_ubuntu || ! sudo /usr/sbin/service zookeeper status | egrep -q "$running"; then
76
+        start_service zookeeper
77
+    fi
73 78
 }
74 79
 
75 80
 # stop_zookeeper() - Stop running processes (non-screen)