Salt stack job management

Job Management

Salt has the function of rapid correspondence with an extensive number of systems. This methodology causes Salt to make a ground-breaking performing multiple task systems. Salt can run Jobs on more than one system, so Salt uses the work the executives' method to deal with each activity running on every one of the systems. This part clarifies the job of the board in detail.

Job id

Salt has a store catalog, cachedir. Inside this, a catalog that minions keep up is called the proc index. It is situated in the below catalog/var/store/salt/proc.

The proc registry is utilized to keep up every one of the files. At the point when these Files are executed, they appoint with an extraordinary activity ID. This activity id distinguishes the present running jobs on the flunky and enables the Jobs to gaze upward.

Saltutil Module

Salt presents another module that is called the Saltutil work the boarding procedure. This module contains distinctive capacities to oversee Jobs. These capacities are utilized to oversee jobs at the follower level. The capacities are depicted in short as pursues −

*running − Returns all the running jobs data that are found in the proc directory.

*find_job − Returns specific data about a certain job based on the job id.

*signal_job − Allows a given job id(jid) to be sent a signal.

*term_job − Sends a termination signal for the specified job.

*kill_job − Sends a kill signal for the specified job.

Jobs Runner

The jobs runner contains functions to make viewing data easier and cleaner. It has different functions

Active Function

The Active function identifies which jobs are still running and checks what systems have completed a job and what systems are still being waited on. It is executed using the following command

#salt-run jobs.active

LOOKUP_JID Function

The lookup_jid runner will display the data for the current-looking job. These jobs are configured via the keep_jobs option in the master configuration. It is executed using the following command.

#List multiple information about the job with the id:20151101225221651308 like the result output

salt-run jobs.lookup_jid 20151101225221651308

LIST_JOBS Function

The List_jobs function is used to list out the job data for jobs. It is expressed by the following command 

# List all jobs with the id and other information

Recent Comments

No comments

Leave a Comment