You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gr...@apache.org on 2018/05/08 01:18:32 UTC

[4/5] mesos git commit: Prevented master from sending operation updates to v0 frameworks.

Prevented master from sending operation updates to v0 frameworks.

Review: https://reviews.apache.org/r/66995/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9d897259
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9d897259
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9d897259

Branch: refs/heads/master
Commit: 9d897259a39dc9f90e8fad191732a3fe45d63458
Parents: a570f94
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Mon May 7 17:33:32 2018 -0700
Committer: Greg Mann <gr...@gmail.com>
Committed: Mon May 7 18:15:30 2018 -0700

----------------------------------------------------------------------
 src/master/master.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9d897259/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index f48a4f7..41862db 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -2279,7 +2279,11 @@ void Master::drop(
                << " operation from framework " << *framework
                << ": " << message;
 
-  if (operation.has_id()) {
+  // NOTE: The operation validation code should be refactored. Due to the order
+  // of validation, it's possible that this function will be called before the
+  // master validates that operations from v0 frameworks should not have their
+  // ID set.
+  if (operation.has_id() && framework->http.isSome()) {
     scheduler::Event update;
     update.set_type(scheduler::Event::UPDATE_OPERATION_STATUS);