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/0772d223 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0772d223 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0772d223 Branch: refs/heads/1.6.x Commit: 0772d223da5b6953ca5b975c790b909e188e6928 Parents: 2e31819 Author: Gaston Kleiman <[email protected]> Authored: Mon May 7 17:33:32 2018 -0700 Committer: Greg Mann <[email protected]> Committed: Mon May 7 18:22:01 2018 -0700 ---------------------------------------------------------------------- src/master/master.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/0772d223/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);
