Details
-
Feature
-
Status: Released (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Starting Situation
- When a shell script is executed within a job and when this script writes messages to the standard error channel ("stderr") then
- the JobScheduler writes these messages to the task's log with severity "info", e.g.
2015-03-18 07:57:38.993+0100 [info] This message goes to stderr
- the JobScheduler handles the script execution as being successful if the exit code returned by the script is 0.
- the JobScheduler writes these messages to the task's log with severity "info", e.g.
Desired Behavior
- Logging
- Messages received via the standard error channel are added with "error" severity, e.g.
2015-03-18 07:57:38.993+0100 [error] This message goes to stderr
- This behavior has precedence over
JS-1393, i.e. no specifics to identify the error channel as with [stderr] are added.
- Messages received via the standard error channel are added with "error" severity, e.g.
- Handling of errors
- The JobScheduler would raise an error for any output to stderr.
- Depending on the job settings and the job node settings the usual behavior for failed execution would apply, e.g. the job could stop, an order could be suspended, setback etc.
Scope
- This behavior applies to shell jobs, not to API jobs. API jobs can use the method spooler_task.stderr_text() to check output to stderr and to react accordingly.
- This behavior applies to jobs executed by JobScheduler instances, including clustered instances, and to JobScheduler Agents. An Agent would forward errors to the respective JobScheduler Master.
Configuration
- A new attribute <job stderr_log_level="error|info"> is introduced.
- A value error would cause the desired behavior.
- The default value is info and would cause JobScheduler to stick to the current behavior.
Maintainer Notes
- The functionality of this feature proposal is clearly targeted at the handling of errors based on a check of output to stderr.
- For identifying the output channel from JobScheduler logs without further action being taken by JobScheduler in case of output to stderr, see
JS-1393.