This is an automated email from the ASF dual-hosted git repository.

bennoe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit c44b4fb3580d3ca5349168552e068a2343b91f61
Author: Benno Evers <[email protected]>
AuthorDate: Fri Nov 8 14:04:57 2019 +0100

    Rejected operator API calls that include reservation updates.
    
    Review: https://reviews.apache.org/r/71688/
---
 src/master/http.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/master/http.cpp b/src/master/http.cpp
index 60765c9..9efe4a3 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -2005,9 +2005,16 @@ Future<Response> Master::Http::reserveResources(
   CHECK_EQ(mesos::master::Call::RESERVE_RESOURCES, call.type());
 
   const SlaveID& slaveId = call.reserve_resources().slave_id();
+  const RepeatedPtrField<Resource>& source = call.reserve_resources().source();
   const RepeatedPtrField<Resource>& resources =
     call.reserve_resources().resources();
 
+  // Reject all `Reserve` operations whenever `source` is set
+  // until we have a proper implementation in place.
+  if (!source.empty()) {
+    return BadRequest("Reservation updates not yet supported.");
+  }
+
   return _reserve(slaveId, resources, principal);
 }
 

Reply via email to