Repository: mesos Updated Branches: refs/heads/master 93c680912 -> 71160110b
Made resource provider manager conditionally set framework ID. When forwarding operation status updates from resource providers to the agent, the manager was setting the framework ID unconditionally. This is a problem when OPERATION_DROPPED updates with no framework ID are generated by the resource provider. Review: https://reviews.apache.org/r/65034/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/71160110 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/71160110 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/71160110 Branch: refs/heads/master Commit: 71160110bb9458a6e584350ccae7709ae05a5b0c Parents: b9bf0b5 Author: Greg Mann <[email protected]> Authored: Wed Jan 10 10:43:02 2018 -0800 Committer: Greg Mann <[email protected]> Committed: Wed Jan 10 14:03:59 2018 -0800 ---------------------------------------------------------------------- src/resource_provider/manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/71160110/src/resource_provider/manager.cpp ---------------------------------------------------------------------- diff --git a/src/resource_provider/manager.cpp b/src/resource_provider/manager.cpp index 6434693..5d064bf 100644 --- a/src/resource_provider/manager.cpp +++ b/src/resource_provider/manager.cpp @@ -634,9 +634,11 @@ void ResourceProviderManagerProcess::updateOperationStatus( const Call::UpdateOperationStatus& update) { ResourceProviderMessage::UpdateOperationStatus body; - body.update.mutable_framework_id()->CopyFrom(update.framework_id()); body.update.mutable_status()->CopyFrom(update.status()); body.update.mutable_operation_uuid()->CopyFrom(update.operation_uuid()); + if (update.has_framework_id()) { + body.update.mutable_framework_id()->CopyFrom(update.framework_id()); + } if (update.has_latest_status()) { body.update.mutable_latest_status()->CopyFrom(update.latest_status()); }
