title: Leader election in Mesos cluster seems not working
body: <p>I am setting up Mesos Cluster(ZooKeeper+Mesos) using docker, with 3 nodes(A,B,C) running zookeeper&amp;master&amp;slave containers for each.</p>
  
  <p><strong>node B &amp; C redirects each other (quorum=2)</strong></p>
  
  <p>As I run Mesos-Master container and open Mesos Web UI,</p>
  
  <ul>
  <li>node A seems like a master node</li>
  <li>node B redirects to node C</li>
  <li>node C redirects to node B</li>
  </ul>
  
  <p>It seems strange that node A is isolated and node B and C redirects each other forever.</p>
  
  <p><strong>What is happening here?</strong></p>
  
  <p><code>docker run</code> command for Mesos-Master is as following.
  (Same for 3 nodes except <code>MESOS_IP</code>)</p>
  
  <pre><code>docker run 
  --net=host 
  -e MESOS_LOG_DIR=/var/log/mesos 
  -e MESOS_ZK=zk://&lt;hostname-nodeA&gt;:2181,&lt;hostname-nodeB&gt;:2181,&lt;hostname-nodeC&gt;:2181/mesos 
  -e MESOS_CLUSTER=cheeter 
  -e MESOS_HOSTNAME=&lt;hostname-nodeA&gt; 
  -e MESOS_WORK_DIR=/var/lib/mesos 
  -e MESOS_QUORUM=2 
  -e MESOS_ISOLATOR=cgroups/cpu,cgroups/mem,cgroups/devices 
  -e MESOS_CONTAINERIZERS=docker,mesos 
  -e MESOS_IP=&lt;ip-nodeA&gt; 
  -p 5050:5050 
  -v /run/docker.sock:/var/run/docker.sock 
  -v /var/log:/var/log 
  -v /cgroup:/cgroup 
  -v /sys:/sys 
  -v /proc:/proc 
  -t mesosphere/mesos-master:0.20.1
  </code></pre>
  
  <p><code>docker run</code> command for ZooKeeper is as following.
  (Same for 3 nodes except <code>ZOOKEEPER_ID</code>)</p>
  
  <pre><code>docker run 
  -e ZOOKEEPER_ID=1 
  -e ZOOKEEPER_SERVER_1=&lt;hostname-nodeA&gt;:2888:3888 
  -e ZOOKEEPER_SERVER_2=&lt;hostname-nodeB&gt;:2888:3888 
  -e ZOOKEEPER_SERVER_3=&lt;hostname-nodeC&gt;:2888:3888 
  -e ZOOKEEPER_DATADIR=/var/zookeeper 
  -p 2181:2181 
  -p 2888:2888 
  -p 3888:3888 
  -v /var:/var 
  -v /sys:/sys 
  -v /proc:/proc 
  -v /cgroup:/cgroup 
  -t jplock/zookeeper:3.4.6
  </code></pre>
  
  <p>I have tried to change quorum number 1-3, and the results were;</p>
  
  <p><strong>3 nodes redirects in roop (quorum=1)</strong></p>
  
  <p>As I run Mesos-Master with <code>quorum=1</code>, nodes redirects in roop like A->B->C->A->....</p>
  
  <p><strong>Each node shows "No master is currently leading..." (quorum=3)</strong></p>
  
  <p>As I run Mesos-Master with <code>quorum=1</code>, no redirection happened and each node shows "No master is currently leading..."</p>