Fixed a bug in `Master::updateSlave()`. A part of `Master::updateSlave()` doesn't account for operations created via the operator API; this patch fixes that.
Review: https://reviews.apache.org/r/66459/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4e55884b Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4e55884b Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4e55884b Branch: refs/heads/master Commit: 4e55884bf78f65cb62398df713426d4606dc9bc9 Parents: 470476c Author: Gaston Kleiman <[email protected]> Authored: Mon Apr 23 13:43:21 2018 -0700 Committer: Greg Mann <[email protected]> Committed: Mon Apr 23 13:47:37 2018 -0700 ---------------------------------------------------------------------- src/master/master.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/4e55884b/src/master/master.cpp ---------------------------------------------------------------------- diff --git a/src/master/master.cpp b/src/master/master.cpp index 5946c7b..67baa6b 100644 --- a/src/master/master.cpp +++ b/src/master/master.cpp @@ -7775,7 +7775,8 @@ void Master::updateSlave(UpdateSlaveMessage&& message) addOperation(framework, slave, new Operation(operation)); - if (!protobuf::isTerminalState(operation.latest_status().state())) { + if (!protobuf::isTerminalState(operation.latest_status().state()) && + operation.has_framework_id()) { // If we do not yet know the `FrameworkInfo` of the framework the // operation originated from, we cannot properly track the operation // at this point.
