-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57973/
-----------------------------------------------------------

(Updated March 31, 2017, 11:36 p.m.)


Review request for mesos, John Kordich, Joseph Wu, Li Li, and Michael Park.


Changes
-------

Fixed up comments and ordering. Also explicitly delete `JobData` on `cleanup()` 
invocation, with the understanding that parent hooks can be added to gather 
statistics etc. from the job object before it is cleaned up.


Summary (updated)
-----------------

Windows: Added `JobObjectManager` actor.


Bugs: MESOS-6868 and MESOS-6892
    https://issues.apache.org/jira/browse/MESOS-6868
    https://issues.apache.org/jira/browse/MESOS-6892


Repository: mesos


Description
-------

This commit adds a Windows specific actor for managing job objects.

A subprocess launched with the `ParentHook::CREATE_JOB()` is created
within the context of a named Windows job object. The `JobObjectManager`
takes ownership of the handle to the job object.

It is necessary to tie the lifetime of the job object to the actor by
ownership of the open handle so that the job object can be queried for
usage information even after the processes that were running within the
job object have ended. These semantics were not changed; previously the
same was achieved by leaking the handle and tieing it to the lifetime of
the actual Mesos agent process, and implicitly depending on the
operating system to close the open handle at the death of the process.

We ensure the proper death of the job object process group by defering a
call to `cleanup()` to the process reaper for the given PID. This
function uses the Windows system call to terminate the job object via
`os::kill_job()`.


Diffs (updated)
-----

  3rdparty/libprocess/include/process/windows/jobobject.hpp PRE-CREATION 
  3rdparty/libprocess/src/process.cpp f6ee24e2db43d63d91222549efee85421bbf9bf3 
  3rdparty/libprocess/src/subprocess.cpp 
6dfb939ec151f724d383870a806ca3fc8fb0d931 


Diff: https://reviews.apache.org/r/57973/diff/2/

Changes: https://reviews.apache.org/r/57973/diff/1-2/


Testing
-------

Testing done at end of chain.


Thanks,

Andrew Schwartzmeyer

Reply via email to