Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor corrections to text

...

Jira
serverSOS JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution,fixversions
maximumIssues20
jqlQueryissue = joc-10 or issue = js-1163 or issue = js-1307 or issue = js-1382 or issue = js-1420 or issue = js-1421 or issue = js-1463 or issue = js-1468 or issue = js-1495
serverId6dc67751-9d67-34cd-985b-194a8cdc9602

Use Case

  • Welche Rolle ist für den Fall verantwortlich? Wer will etwas? Engineering, Operating, Business
  • Was ist das Ziel? Was ist das Mittel? Was ist die Motivation?

The information contained in this article draws together detailed information contained in a range of issues and should primarily be of interest to persons in engineering and to a lesser extent persons in operating functions.

...

  1. Operation: kill immediately
    • JOC sends <kill_task immediately="yes"/>
    • The process is killed immediately using the SIGKILL signal.
  2. Operation: terminate with timeout
    • JOC sends <kill_task immediately="yes" timeout="15"/>
    • The process receives a SIGTERM signal. Should that process not terminate within the specified timeout period then it will be killed with a SIGKILL signal.
  3. Operation: terminate
    • JOC sends <kill_task immediately="yes" timeout="never"/>
    • The respective process receives a SIGTERM signal. No monitoring of the termination of that process as in operation 2) is performed.The process receives a SIGTERM signal. Monitoring of the process termination as described in operation Operation 2 . above is not carried out.

Delimitation

...

  • A monitor (i.e. a pre-/postprocessing script) has to be configured for shell jobs that have a timeout set (JS-1463).
    For example:

    Code Block
    languagexml
    titleWorkaround for shell jobs with a timeout
    <job name="shell_with_javascript_monitor">
        <script  language="shell">
            <![CDATA[
    echo hello world!
    sleep 45
            ]]>
        </script>
    
        <monitor  name="process0" ordering="0">
            <script  language="java:javascript">
                <![CDATA[
    function spooler_process_before(){
    	return true;
    }
                ]]>
            </script>
        </monitor>
    
        <run_time />
    </job>

Example

  • Beispiel Code und Erläuterungen
    • Code Beispiel via Confluence Code Macro
  • Beispiel Objekte
    • Ganze Objekte wie jobs, orders etc nur als Anhang

Download the Example

job_trap_sigterm.job.xml.zip

...

This example contains a job that uses a sigterm trap to show the difference between the kill_task and terminate_task commands provided by JOC.

The job job_trap_sigterm.job.xml shows how to trap the terminate command provided by JOC.

...

Code Block
languagexml
<?xml version="1.0" encoding="ISO-8859-1"?>

<job  title="test test">
    <script  language="shell">
        <![CDATA[
trap 'echo sigterm will be ignored' 15
for i in 1 2 3 4 5 6 7 8 9 0
do
date
sleep 10
done
sleep 60
        ]]>
    </script>

    <run_time />
</job>

Additional resources

References

...

  • JIRA Issues

...