Skip to content

Commit db6cb07

Browse files
Jenkinsopenstack-gerrit
Jenkins
authored andcommitted
Merge "On Ubuntu: don't start Zookeeper twice"
2 parents 2e17de1 + 04e73e1 commit db6cb07

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/zookeeper

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ function install_zookeeper {
6969

7070
# start_zookeeper() - Start running processes, including screen
7171
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
7378
}
7479

7580
# stop_zookeeper() - Stop running processes (non-screen)

0 commit comments

Comments
 (0)