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/01/10 22:04:40 UTC
[1/2] mesos git commit: Made resource provider manager conditionally
set framework ID.
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 <gr...@mesosphere.io>
Authored: Wed Jan 10 10:43:02 2018 -0800
Committer: Greg Mann <gr...@gmail.com>
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());
}
[2/2] mesos git commit: Improved the documentation of protos related
to operation feedback.
Posted by gr...@apache.org.
Improved the documentation of protos related to operation feedback.
Review: https://reviews.apache.org/r/64936/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b9bf0b54
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b9bf0b54
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b9bf0b54
Branch: refs/heads/master
Commit: b9bf0b54b85a054eb48b1f33de460b1f05e06b1c
Parents: 93c6809
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Wed Jan 10 10:42:25 2018 -0800
Committer: Greg Mann <gr...@gmail.com>
Committed: Wed Jan 10 14:03:59 2018 -0800
----------------------------------------------------------------------
include/mesos/mesos.proto | 5 +++++
include/mesos/scheduler/scheduler.proto | 6 ++++++
include/mesos/v1/mesos.proto | 5 +++++
include/mesos/v1/scheduler/scheduler.proto | 6 ++++++
4 files changed, 22 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/b9bf0b54/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 01b05f9..2c5ae4c 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -2306,7 +2306,12 @@ enum OperationState {
* Describes the current status of an operation.
*/
message OperationStatus {
+ // While frameworks will only receive status updates for operations on which
+ // they have set an ID, this field is optional because this message is also
+ // used internally by Mesos components when the operation's ID has not been
+ // set.
optional OperationID operation_id = 1;
+
required OperationState state = 2;
optional string message = 3;
http://git-wip-us.apache.org/repos/asf/mesos/blob/b9bf0b54/include/mesos/scheduler/scheduler.proto
----------------------------------------------------------------------
diff --git a/include/mesos/scheduler/scheduler.proto b/include/mesos/scheduler/scheduler.proto
index 4258fb3..7a90355 100644
--- a/include/mesos/scheduler/scheduler.proto
+++ b/include/mesos/scheduler/scheduler.proto
@@ -404,8 +404,14 @@ message Call {
// Such status updates are retried by the agent or resource provider until
// they are acknowledged by the scheduler.
message AcknowledgeOperationStatus {
+ // If the operation affects resources that belong to a SLRP, both
+ // `slave_id` and `resource_provider_id` have to be set.
+ //
+ // If the operation affects resources that belong to a SERP, only
+ // `resource_provider_id` has to be set.
optional SlaveID slave_id = 1;
optional ResourceProviderID resource_provider_id = 2;
+
required bytes uuid = 3;
required OperationID operation_id = 4;
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/b9bf0b54/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index b35b3f8..b8e016e 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -2287,7 +2287,12 @@ enum OperationState {
* Describes the current status of an operation.
*/
message OperationStatus {
+ // While frameworks will only receive status updates for operations on which
+ // they have set an ID, this field is optional because this message is also
+ // used internally by Mesos components when the operation's ID has not been
+ // set.
optional OperationID operation_id = 1;
+
required OperationState state = 2;
optional string message = 3;
http://git-wip-us.apache.org/repos/asf/mesos/blob/b9bf0b54/include/mesos/v1/scheduler/scheduler.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/scheduler/scheduler.proto b/include/mesos/v1/scheduler/scheduler.proto
index 688ba55..f08fdfb 100644
--- a/include/mesos/v1/scheduler/scheduler.proto
+++ b/include/mesos/v1/scheduler/scheduler.proto
@@ -389,8 +389,14 @@ message Call {
// Such status updates are retried by the agent or resource provider
// until they are acknowledged by the scheduler.
message AcknowledgeOperationStatus {
+ // If the operation affects resources that belong to a SLRP, both
+ // `agent_id` and `resource_provider_id` have to be set.
+ //
+ // If the operation affects resources that belong to a SERP, only
+ // `resource_provider_id` has to be set.
optional AgentID agent_id = 1;
optional ResourceProviderID resource_provider_id = 2;
+
required bytes uuid = 3;
required OperationID operation_id = 4;
}