Joseph Wu created MESOS-9527:
--------------------------------
Summary: Agent does not check if master pings come from expected
leader
Key: MESOS-9527
URL: https://issues.apache.org/jira/browse/MESOS-9527
Project: Mesos
Issue Type: Bug
Components: agent, master
Affects Versions: 1.2.0
Reporter: Joseph Wu
The agent code that receives pings from the master does not check if the ping
comes from an expected source:
https://github.com/apache/mesos/blob/master/src/slave/slave.cpp#L5944-L5946
This can be problematic if, for some reason, the agent is moved from one
cluster to another.
For example:
# First, I started two masters, on localhost:
{code}
src/mesos-master --work_dir=/tmp/master1
src/mesos-master --work_dir=/tmp/master2 --port=5052
{code}
# Next, I started an agent and pointed it at the first master
{code}
src/mesos-agent --work_dir=/tmp/agent --master=127.0.0.1:5050
{code}
# I promptly killed the agent after it had registered and pointed it at the
second master
{code}
src/mesos-agent --work_dir=/tmp/agent --master=127.0.0.1:5052
{code}
The agent was now disconnected from Master1, and connected to Master2.
However, Master1 continues to ping the agent (saying the agent is
disconnected). This causes the agent to re-register with Master2 every 15
seconds.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)