James DeFelice created MESOS-2499:
-------------------------------------
Summary: SOURCE_EXECUTOR not set properly in slave.cpp
Key: MESOS-2499
URL: https://issues.apache.org/jira/browse/MESOS-2499
Project: Mesos
Issue Type: Bug
Components: slave
Reporter: James DeFelice
Slave::statusUpdate attempts to set the Source of the TaskStatus to either
SOURCE_SLAVE or SOURCE_EXECUTOR:
https://github.com/apache/mesos/blob/0.21.0/src/slave/slave.cpp#L2222
{code}
TaskStatus status = update.status();
status.set_source(pid == UPID() ? TaskStatus::SOURCE_SLAVE
: TaskStatus::SOURCE_EXECUTOR);
{code}
Unfortunately it make this change to a copy of the TaskStatus that's later
discarded and the change is never saved to the parent StatusUpdate. This
results in slave-forward()ed status updates that lack a proper source value.
The likely fix is that the set_source() update should be invoked on a
TaskStatus* that's obtained via StatusUpdate.mutable_status() so that the new
source is saved properly. It's not clear to me if StatusUpdate should be
obtained via mutable_update().
It would also be helpful to have a unit test for this scenario.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)