Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-9448

Semantics of RECONCILE_OPERATIONS framework API call are incorrect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • framework, HTTP API, master
    • None

    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

          Activity

            People

              Unassigned Unassigned
              bbannier Benjamin Bannier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: