Details
Description
A new kind of module that receives callbacks at significant life cycle events of its host libprocess process. Typically the latter is a Mesos slave or master and the life time of the libprocess process coincides with the underlying OS process.
Motivation and Use Cases
We want to add customized and experimental capabilities that concern the life time of Mesos components without protruding into Mesos source code and without creating new build process dependencies for everybody.
Example use cases:
1. A slave or master life cycle module that gathers fail-over incidents and reports summaries thereof to a remote data sink.
2. A slave module that observes host computer metrics and correlates these with task activity. This can be used to find resources leaks and to prevent, respectively guide, oversubscription.
3. Upgrades and provisioning that require shutdown and restart.
Specifics
The specific life cycle events that we want to get notified about and want to be able to act upon are:
- Process is spawning/initializing
- Process is terminating/finalizing
In all these cases, a reference to the process is passed as a parameter, giving the module access for inspection and reaction.
Module Classification
Unlike other named modules, a life cycle module does not directly replace or provide essential Mesos functionality (such as an Isolator module does). Unlike a decorator module it does not directly add or inject data into Mesos core either.