Details
-
Feature
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.10, 1.11, 1.12
-
None
Description
Current Situation
- A node in a job chain is configured with the on_error="suspend" attribute.
- There is also a <on_return_code return_code="2"> attribute
- The job terminates with exit code 2
- The order will be suspended by JobScheduler Master. See the following sample configuration:
<job_chain name="job_chain"> <job_chain_node state="100" job="job1" next_state="200" error_state="error" on_error="suspend"> <on_return_codes > <on_return_code return_code="2"> <to_state state="200"/> </on_return_code> </on_return_codes> </job_chain_node> <job_chain_node state="200" job="job2" next_state="success" error_state="error"/> <job_chain_node state="success"/> <job_chain_node state="error"/> </job_chain>
Desired Behavior
- If a task for an order step ends with an exit code != 0 then the order step should be considered successful if the task's exit code is handled by the <on_return_code return_code="xxx"><to_state> configuration.
- This includes that the on_error="suspend" attribute that is optionally configured for the job node of the order step should be ignored, i.e. the result of the order step is considered similar to a task's exit code 0.
- Any other <on_return_code> configuration that does not include a <to_state> element as e.g. <NodeOrderPlugin:add_order> is not affected by this change and the known behavior specified by the on_error and state attributes applies.
Maintainer Notes
- Consider that the behavior modifies the order step, not the task.
- A task's exit code still is considered an error and is reported to the log.
- A job that is configured to stop in case of error will stop accordingly.
- Notification by e-email will be sent if configured.
Attachments
Issue Links
- relates to
-
JS-1190 Control the workflow of a job chain by exit codes
- Released