Repository: mesos Updated Branches: refs/heads/master 924c8f1b4 -> 0c4a5c04e
Added the OFFER_OPERATION_DROPPED state. The new state is used to indicate that an operation has been dropped due to a transient error. Review: https://reviews.apache.org/r/64463/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0c4a5c04 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0c4a5c04 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0c4a5c04 Branch: refs/heads/master Commit: 0c4a5c04e4511bd1b232be9f0b1811ba1f38ae2c Parents: 924c8f1 Author: Greg Mann <g...@mesosphere.io> Authored: Tue Dec 12 09:16:34 2017 -0800 Committer: Greg Mann <gregorywm...@gmail.com> Committed: Tue Dec 12 09:16:34 2017 -0800 ---------------------------------------------------------------------- include/mesos/mesos.proto | 3 +++ include/mesos/v1/mesos.proto | 3 +++ src/common/protobuf_utils.cpp | 1 + src/master/master.cpp | 3 ++- src/slave/slave.cpp | 3 ++- 5 files changed, 11 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/0c4a5c04/include/mesos/mesos.proto ---------------------------------------------------------------------- diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto index 0ce2598..59c80ad 100644 --- a/include/mesos/mesos.proto +++ b/include/mesos/mesos.proto @@ -2290,6 +2290,9 @@ enum OfferOperationState { // The operation description contains an error. OFFER_OPERATION_ERROR = 4; + + // The operation was dropped due to a transient error. + OFFER_OPERATION_DROPPED = 5; } http://git-wip-us.apache.org/repos/asf/mesos/blob/0c4a5c04/include/mesos/v1/mesos.proto ---------------------------------------------------------------------- diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto index 10ce949..6c263b5 100644 --- a/include/mesos/v1/mesos.proto +++ b/include/mesos/v1/mesos.proto @@ -2271,6 +2271,9 @@ enum OfferOperationState { // The operation description contains an error. OFFER_OPERATION_ERROR = 4; + + // The operation was dropped due to a transient error. + OFFER_OPERATION_DROPPED = 5; } http://git-wip-us.apache.org/repos/asf/mesos/blob/0c4a5c04/src/common/protobuf_utils.cpp ---------------------------------------------------------------------- diff --git a/src/common/protobuf_utils.cpp b/src/common/protobuf_utils.cpp index c5504a0..3bc72e4 100644 --- a/src/common/protobuf_utils.cpp +++ b/src/common/protobuf_utils.cpp @@ -404,6 +404,7 @@ bool isTerminalState(const OfferOperationState& state) case OFFER_OPERATION_FINISHED: case OFFER_OPERATION_FAILED: case OFFER_OPERATION_ERROR: + case OFFER_OPERATION_DROPPED: return true; case OFFER_OPERATION_PENDING: case OFFER_OPERATION_UNSUPPORTED: http://git-wip-us.apache.org/repos/asf/mesos/blob/0c4a5c04/src/master/master.cpp ---------------------------------------------------------------------- diff --git a/src/master/master.cpp b/src/master/master.cpp index b10d034..50475e7 100644 --- a/src/master/master.cpp +++ b/src/master/master.cpp @@ -10386,7 +10386,8 @@ void Master::updateOfferOperation( // Terminal state, and the conversion has failed. case OFFER_OPERATION_FAILED: - case OFFER_OPERATION_ERROR: { + case OFFER_OPERATION_ERROR: + case OFFER_OPERATION_DROPPED: { allocator->recoverResources( operation->framework_id(), operation->slave_id(), http://git-wip-us.apache.org/repos/asf/mesos/blob/0c4a5c04/src/slave/slave.cpp ---------------------------------------------------------------------- diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp index d2be4f4..5869e73 100644 --- a/src/slave/slave.cpp +++ b/src/slave/slave.cpp @@ -7373,7 +7373,8 @@ void Slave::updateOfferOperation( // Terminal state, and the conversion has failed. case OFFER_OPERATION_FAILED: - case OFFER_OPERATION_ERROR: { + case OFFER_OPERATION_ERROR: + case OFFER_OPERATION_DROPPED: { break; }