Description
The typical pattern in the framework HTTP API is that frameworks send calls to which the master responds with Accepted responses and which trigger events. The only designed exception to this are SUBSCRIBE calls to which the master responds with an Ok response containing the assigned framework ID. This is even codified in src/scheduler.cpp:646ff,
if (response->code == process::http::Status::OK) { // Only SUBSCRIBE call should get a "200 OK" response. CHECK_EQ(Call::SUBSCRIBE, call.type());
Currently, the handling of RECONCILE_OPERATIONS calls does not follow this pattern. Instead of sending events, the master immediately responds with a Ok and a list of operations. This e.g., leads to assertion failures in above hard check whenever one uses the Scheduler::send instead of Scheduler::call. One can reproduce this by modifying the existing tests in src/operation_reconciliation_tests.cpp,
mesos.send({createCallReconcileOperations(frameworkId, {operation})}); // ADD THIS. const Future<scheduler::APIResult> result = mesos.call({createCallReconcileOperations(frameworkId, {operation})});
Attachments
Issue Links
- duplicates
-
MESOS-9648 Make operation reconciliation send asynchronous updates
- Resolved
- relates to
-
MESOS-9318 Consider providing better operation status updates while an RP is recovering
- Resolved