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

Refactor the Isolator to return Futures and wrap a libprocess Process.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      Currently the Isolator interface is a libprocess Process:

      class Isolator : public process::Process<Isolator>
      {
      ...
      virtual void killExecutor(
      const FrameworkID& frameworkId,
      const ExecutorID& executorId) = 0;
      ...
      }

      This has led to issues where we've accidentally called directly into Isolator (instead of dispatching). We should make Isolator a wrapper around a libprocess Process.

      Second, the Isolator should return Futures rather than calling back into the slave. We currently have to construct the ProcessIsolator / CgroupsIsolator by passing in the Slave PID, so that they can dispatch back into the slave to notify when the executor has exited (for example). We can eliminate the need for this by returning Futures!

      class Isolator
      {
      ...
      // Returns a Future that becomes ready when the executor has been killed.
      // Exited contains the status and message.
      virtual Future<Exited> killExecutor(
      const FrameworkID& frameworkId,
      const ExecutorID& executorId);

      { return dispatch(isolator, &IsolatorProcess::killExecutor, frameworkId, executorId); }

      ...

      private:
      IsolatorProcess* isolator;
      }

      Attachments

        Issue Links

          Activity

            People

              idownes Ian Downes
              bmahler Benjamin Mahler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: