mesos service: only pass --zk if quorum > 0

The ZooKeeper URL is not necessary when using in-memory slave
registration.
This commit is contained in:
Charles Strahan 2015-05-10 18:13:00 -04:00
parent 760169663e
commit ba186ec4b9

View file

@ -85,8 +85,9 @@ in {
ExecStart = ''
${pkgs.mesos}/bin/mesos-master \
--port=${toString cfg.port} \
--zk=${cfg.zk} \
${if cfg.quorum == 0 then "--registry=in_memory" else "--registry=replicated_log --quorum=${toString cfg.quorum}"} \
${if cfg.quorum == 0
then "--registry=in_memory"
else "--zk=${cfg.zk} --registry=replicated_log --quorum=${toString cfg.quorum}"} \
--work_dir=${cfg.workDir} \
--logging_level=${cfg.logLevel} \
${toString cfg.extraCmdLineOptions}