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/04/02 18:46:49 UTC

[1/6] mesos git commit: Fixed use of const reference for storing an rvalue in a test.

Repository: mesos
Updated Branches:
  refs/heads/master 7513e8976 -> 594ee20c2


Fixed use of const reference for storing an rvalue in a test.

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


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

Branch: refs/heads/master
Commit: 1f2da7b28b8dbb48010c0796224894b159a7411f
Parents: 7513e89
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Mon Apr 2 10:43:56 2018 -0700
Committer: Greg Mann <gr...@gmail.com>
Committed: Mon Apr 2 11:43:07 2018 -0700

----------------------------------------------------------------------
 src/tests/storage_local_resource_provider_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1f2da7b2/src/tests/storage_local_resource_provider_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/storage_local_resource_provider_tests.cpp b/src/tests/storage_local_resource_provider_tests.cpp
index 846ef43..2872f1a 100644
--- a/src/tests/storage_local_resource_provider_tests.cpp
+++ b/src/tests/storage_local_resource_provider_tests.cpp
@@ -3257,7 +3257,7 @@ TEST_F(
     .WillOnce(FutureArg<1>(&retriedUpdate));
 
   // Create a volume.
-  const string& operationId = "operation";
+  const string operationId = "operation";
   mesos.send(v1::createCallAccept(
       frameworkId,
       offer,


[5/6] mesos git commit: Fixed generation of operation status updates in `Master::_apply()`.

Posted by gr...@apache.org.
Fixed generation of operation status updates in `Master::_apply()`.

This patch updates `Master::_apply() ` to make it include operation ID
in the initial operation status of operations that have an ID set.

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


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

Branch: refs/heads/master
Commit: 4e677ad8d8137b3d29ed7a20a02c934910a5b1c5
Parents: 9f3f1f9
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Mon Apr 2 10:44:11 2018 -0700
Committer: Greg Mann <gr...@gmail.com>
Committed: Mon Apr 2 11:44:07 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/4e677ad8/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 20692c3..a8dee8e 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -10820,7 +10820,11 @@ void Master::_apply(
     Operation* operation = new Operation(
         protobuf::createOperation(
             operationInfo,
-            protobuf::createOperationStatus(OPERATION_PENDING),
+            protobuf::createOperationStatus(
+              OPERATION_PENDING,
+              operationInfo.has_id()
+                ? operationInfo.id()
+                : Option<OperationID>::none()),
             framework != nullptr
               ? framework->id()
               : Option<FrameworkID>::none(),


[2/6] mesos git commit: Removed unnecessary code and a misleading comment from a test.

Posted by gr...@apache.org.
Removed unnecessary code and a misleading comment from a test.

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


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

Branch: refs/heads/master
Commit: b7cc83140561816444842968d6c4d3b13d4c49a0
Parents: 1f2da7b
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Mon Apr 2 10:44:04 2018 -0700
Committer: Greg Mann <gr...@gmail.com>
Committed: Mon Apr 2 11:43:15 2018 -0700

----------------------------------------------------------------------
 src/tests/reconciliation_tests.cpp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b7cc8314/src/tests/reconciliation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reconciliation_tests.cpp b/src/tests/reconciliation_tests.cpp
index ad6c993..b06244b 100644
--- a/src/tests/reconciliation_tests.cpp
+++ b/src/tests/reconciliation_tests.cpp
@@ -448,14 +448,11 @@ TEST_F(ReconciliationTest, RecoveredAgent)
   Try<Owned<cluster::Master>> master = StartMaster(masterFlags);
   ASSERT_SOME(master);
 
-  // Reuse slaveFlags so both StartSlave() use the same work_dir.
-  slave::Flags slaveFlags = CreateSlaveFlags();
-
   Future<SlaveRegisteredMessage> slaveRegisteredMessage =
     FUTURE_PROTOBUF(SlaveRegisteredMessage(), _, _);
 
   Owned<MasterDetector> detector = master.get()->createDetector();
-  Try<Owned<cluster::Slave>> slave = StartSlave(detector.get(), slaveFlags);
+  Try<Owned<cluster::Slave>> slave = StartSlave(detector.get());
   ASSERT_SOME(slave);
 
   // Wait for the slave to register and get the slave id.


[4/6] mesos git commit: Fixed generation of operation statuses in `Slave::applyOperation()`.

Posted by gr...@apache.org.
Fixed generation of operation statuses in `Slave::applyOperation()`.

This patch updates `Slave::applyOperation()` to make it include the
operation ID in operation statuses when the ID is set.

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


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

Branch: refs/heads/master
Commit: 9f3f1f979d520f5a77715976dcea9ba39517ec0f
Parents: 9689d78
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Mon Apr 2 10:44:07 2018 -0700
Committer: Greg Mann <gr...@gmail.com>
Committed: Mon Apr 2 11:43:28 2018 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9f3f1f97/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index a4bd4cc..b178547 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -4267,6 +4267,10 @@ void Slave::applyOperation(const ApplyOperationMessage& message)
     ? message.framework_id()
     : Option<FrameworkID>::none();
 
+  Option<OperationID> operationId = message.operation_info().has_id()
+    ? message.operation_info().id()
+    : Option<OperationID>::none();
+
   Result<ResourceProviderID> resourceProviderId =
     getResourceProviderId(message.operation_info());
 
@@ -4286,7 +4290,7 @@ void Slave::applyOperation(const ApplyOperationMessage& message)
   Operation* operation = new Operation(
       protobuf::createOperation(
           message.operation_info(),
-          protobuf::createOperationStatus(OPERATION_PENDING),
+          protobuf::createOperationStatus(OPERATION_PENDING, operationId),
           frameworkId,
           info.id(),
           uuid));
@@ -4320,7 +4324,7 @@ void Slave::applyOperation(const ApplyOperationMessage& message)
   UpdateOperationStatusMessage update =
     protobuf::createUpdateOperationStatusMessage(
         uuid,
-        protobuf::createOperationStatus(OPERATION_FINISHED),
+        protobuf::createOperationStatus(OPERATION_FINISHED, operationId),
         None(),
         frameworkId,
         info.id());


[6/6] mesos git commit: Made the master drop `RECONCILE_OPERATIONS` calls from v0 schedulers.

Posted by gr...@apache.org.
Made the master drop `RECONCILE_OPERATIONS` calls from v0 schedulers.

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


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

Branch: refs/heads/master
Commit: 594ee20c2453dad836313769aef9f8655cd75cd5
Parents: 4e677ad
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Mon Apr 2 10:44:15 2018 -0700
Committer: Greg Mann <gr...@gmail.com>
Committed: Mon Apr 2 11:44:31 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/594ee20c/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index a8dee8e..18382fa 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -2432,7 +2432,10 @@ void Master::receive(
       break;
 
     case scheduler::Call::RECONCILE_OPERATIONS:
-      reconcileOperations(framework, call.reconcile_operations());
+      drop(
+          from,
+          call,
+          "'RECONCILE_OPERATIONS' is not supported by the v0 API");
       break;
 
     case scheduler::Call::MESSAGE:


[3/6] mesos git commit: Added missing `type` field to the `scheduler::Response` protos.

Posted by gr...@apache.org.
Added missing `type` field to the `scheduler::Response` protos.

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


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

Branch: refs/heads/master
Commit: 9689d78307d4db4232e6bc3ad6df7cfe9ab49854
Parents: b7cc831
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Mon Apr 2 10:44:06 2018 -0700
Committer: Greg Mann <gr...@gmail.com>
Committed: Mon Apr 2 11:43:19 2018 -0700

----------------------------------------------------------------------
 include/mesos/scheduler/scheduler.proto    | 3 ++-
 include/mesos/v1/scheduler/scheduler.proto | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9689d783/include/mesos/scheduler/scheduler.proto
----------------------------------------------------------------------
diff --git a/include/mesos/scheduler/scheduler.proto b/include/mesos/scheduler/scheduler.proto
index 339a397..f6a780a 100644
--- a/include/mesos/scheduler/scheduler.proto
+++ b/include/mesos/scheduler/scheduler.proto
@@ -222,7 +222,8 @@ message Response {
     repeated OperationStatus operation_statuses = 1;
   }
 
-  optional ReconcileOperations reconcile_operations = 1;
+  optional Type type = 1;
+  optional ReconcileOperations reconcile_operations = 2;
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/9689d783/include/mesos/v1/scheduler/scheduler.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/scheduler/scheduler.proto b/include/mesos/v1/scheduler/scheduler.proto
index f08fdfb..25ebcfc 100644
--- a/include/mesos/v1/scheduler/scheduler.proto
+++ b/include/mesos/v1/scheduler/scheduler.proto
@@ -220,7 +220,8 @@ message Response {
     repeated OperationStatus operation_statuses = 1;
   }
 
-  optional ReconcileOperations reconcile_operations = 1;
+  optional Type type = 1;
+  optional ReconcileOperations reconcile_operations = 2;
 }