Repository: mesos
Updated Branches:
  refs/heads/1.5.x 663942121 -> 78695e413


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/78695e41
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/78695e41
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/78695e41

Branch: refs/heads/1.5.x
Commit: 78695e413124f5a3d14c7296236608abd936d07e
Parents: 6639421
Author: Greg Mann <[email protected]>
Authored: Wed Jan 10 10:43:02 2018 -0800
Committer: Greg Mann <[email protected]>
Committed: Wed Jan 10 14:06:30 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/78695e41/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());
   }

Reply via email to