You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Chun-Hung Hsiao (JIRA)" <ji...@apache.org> on 2018/08/17 18:32:00 UTC
[jira] [Created] (MESOS-9165) Agent should commit suicide when got
inconsistent ID in DISCONNECTED state.
Chun-Hung Hsiao created MESOS-9165:
--------------------------------------
Summary: Agent should commit suicide when got inconsistent ID in DISCONNECTED state.
Key: MESOS-9165
URL: https://issues.apache.org/jira/browse/MESOS-9165
Project: Mesos
Issue Type: Bug
Affects Versions: 1.6.0, 1.5.0, 1.7.0
Reporter: Chun-Hung Hsiao
Test {{HookTest.MasterSlaveLostHookTest}} is flaky due to the following reason.
Normally, when a new agent register to the master, {{Slave::doReliableRegistration}} keeps sending {{RegisterSlaveMessage}} until the agent becomes {{RUNNING}}, which happens after the agent receives the first {{SlaveRegisteredMessage}}. If another {{SlaveRegisteredMessage}} is received with an inconsistent agent ID, the agent will commit suicide:
[https://github.com/apache/mesos/blob/master/src/slave/slave.cpp#L1525-L1529]
In the above unit test, however, the clock was advanced to simulate a network partition. When the agent detected that the master was unreachable, it transitioned into {{DISCONNECTED}} state. Meanwhile, the master marked the agent as unreachable and removed it:
[https://github.com/apache/mesos/blob/master/src/master/master.cpp#L8788]
Later on, the master processed the second {{RegisterSlaveMessage}}, and assigned a new agent ID. The slave received the {{SlaveRegisteredMessage}} and accepted a different ID:
[https://github.com/apache/mesos/blob/master/src/slave/slave.cpp#L1478-L1522]
This behavior is unexpected. Instead, the agent should also commit suicide in this case.
This becomes problematic since 1.5, because the agent holds a {{LocalResourceProviderDaemon}} that assumes the agent ID never changes within the agent actor's lifecycle:
[https://github.com/apache/mesos/blob/master/src/resource_provider/daemon.cpp#L154]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)