Job Fostering
Job fostering is the processes of artificially consuming a job slot on a tasker in order to represent an externally running job or process.
The vovfosterjob utility runs as a job on a tasker and monitors an external job or process. When the external job or process exits, the vovfosterjob utility will also exit, freeing up the slot in which it was running.
vovfosterjob
vovfosterjob: Usage Message
DESCRIPTION:
A system utility to tell a slave to watch a PID or a JOB by creating
a foster job that runs for the lifetime of the entity being watched.
Resulting foster jobs are stored in the System:Orphanage set, which
can be displayed by passing the set name to 'nc list -alljobs -set'.
This utility is mainly used to prevent overloading of a slave that
has been started on a host that also has a slave in the process of
shutting down gracefully. Such slaves will only exit once any jobs
running on them are complete. Fostering such jobs onto the newly started
slave will result in job slots being consumed, preventing additional
jobs from landing on the host.
OPTIONS:
-h -- Display usage help.
-v -- Increase output verbosity. Repeatable.
-pid PID -- Foster a process. Without the -host or -toslave
option, the resulting foster job will be dispatched
to the first slave found that is running on the same
host where the vovfosterjob command is executed. If
the PID does not exist, the foster job will be
created but will exit immediately.
Compatible with the -host and -toslave options.
-host HOSTNAME -- Specify host to which the foster job should be
dispatched. The resulting foster job will be
dispatched to the first slave found on the
specified host.
Compatible with the -pid and -job options.
-job JOBID -- Foster a job. Without the -host or -toslave option,
the resulting foster job will be dispatched to the
first slave found that is running on the same host
as the job being fostered.
Compatible with the -host and -toslave options.
-fromslave SLAVENAME -- Foster all jobs on specified slave. Normally used
to foster jobs on a slave that has been requested
to gracefully stop after its jobs are finished. This
helps to prevent overloading if the slave is
restarted before the job attrition process is
complete.
Compatible only with, and requires, the -toslave
option.
-toslave SLAVENAME -- Specify slave to which the foster job should be
dispatched. Compatible with the -pid, -job, and
-fromslave options.
-stoppedslaves SLAVENAME --
Foster jobs running on all prior instances of the
specified slave that are in the process of stopping
gracefully. The resulting foster jobs will be
dispatched to the specified slave. Not compatible
with any other option.
EXAMPLES:
% vovfosterjob -job 000123456
% vovfosterjob -job 000123456 -toslave titan
% vovfosterjob -pid 6789
% vovfosterjob -pid 6789 -host titan
% vovfosterjob -fromslave titan_stopped -toslave titan
% vovfosterjob -stoppedslaves titan