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

Support job_object in subprocess on Windows.

    XMLWordPrintableJSON

Details

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

    Description

      Currently, in command executor, we use different code path for posix and windows:

      #ifndef __WINDOWS__
          pid = launchTaskPosix(
              command,
              launcherDir,
              user,
              rootfs,
              sandboxDirectory,
              workingDirectory);
      #else
          // A Windows process is started using the `CREATE_SUSPENDED` flag
          // and is part of a job object. While the process handle is kept
          // open the reap function will work.
          PROCESS_INFORMATION processInformation = launchTaskWindows(
              command,
              rootfs);
      
          pid = processInformation.dwProcessId;
          ::ResumeThread(processInformation.hThread);
          CloseHandle(processInformation.hThread);
          processHandle = processInformation.hProcess;
      #endif
      

      During a recent refactor (MESOS-5753), for the posix path, command executor reused `mesos-containerizer launch` helper to launch user tasks.

      If we were to be able to support job_object in Subprocess, we can get rid of this divergence in command executor. This also allow us to support custom executors on Windows.

      Attachments

        Issue Links

          Activity

            People

              andschwa Andrew Schwartzmeyer
              jieyu Jie Yu
              Joseph Wu Joseph Wu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: