Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Job Timeout using an Option Value is not honored when a Job is Referenced #5046

Closed
sebastianbello opened this issue Jul 11, 2019 · 1 comment

Comments

@sebastianbello
Copy link

commented Jul 11, 2019

Describe the bug
When a Job, including an Option value in the Job Timeout setting, is called as a Job Ref, the Timeout is not honored. This happens both, when the value is passed as an argument or when the timeout option is "defaulted" in the Child Job definition.

My Rundeck detail

  • Rundeck version: tested in 3.0.23 - 3.1-RC
  • install type: ANY

To Reproduce
Steps to reproduce the behavior:

  1. Create a CHILD job that "sleeps" for , eg, 30s.
  2. Define Job Timeout as an option. Set a default value (eg 5s) in this option.
  3. Create a Parent Job with a Timeout option
  4. Add a Job Ref to CHILD job, adding "option.timeout" as an argument
  5. Run Parent job. Set Timeout option as, eg, 7s. Timeout is not honored in the Child Job (either default or passed option).

Expected behavior
Job Timeout, when set as an option, should be honored in Referenced Jobs ( works as expected if hardcoded).

Screenshots
If applicable, add screenshots to help explain your problem.
image

image

image

option value is passed, but not honored
image

Additional context
When "Timeout as an Option" was added, something may have been missed in order to work when Job is referenced.

@sebastianbello

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

PARENT JOB:

- defaultTab: nodes
  description: 'Calls CHILD as JobRef. "timeout" value is passed. Child needs to honor
    timeout. '
  executionEnabled: true
  group: TIMEOUT
  id: 884643d9-a212-4d19-b395-adc77de0cc67
  loglevel: INFO
  name: PARENT
  nodeFilterEditable: false
  options:
  - name: timeout
    value: '5'
  scheduleEnabled: true
  sequence:
    commands:
    - exec: echo PARENT calling CHILD
    - description: PARENT references CHILD passing `timeout` value as an option
      jobref:
        group: TIMEOUT
        importOptions: true
        name: CHILD
        nodeStep: 'true'
        uuid: d3cb6fc3-4403-4ac9-8e38-22ceddd32c3d
    keepgoing: false
    strategy: node-first
  uuid: 884643d9-a212-4d19-b395-adc77de0cc67

CHILD: JOB

- defaultTab: nodes
  description: receives Timeout Value from Parent
  executionEnabled: true
  group: TIMEOUT
  id: d3cb6fc3-4403-4ac9-8e38-22ceddd32c3d
  loglevel: INFO
  name: CHILD
  nodeFilterEditable: false
  options:
  - name: timeout
    value: '7'
  scheduleEnabled: true
  sequence:
    commands:
    - exec: echo STARTING CHILD
    - exec: 'echo Timeout option value: ${option.timeout}'
    - exec: echo Sleeping for 30s
    - exec: sleep 30
    keepgoing: false
    strategy: node-first
  timeout: ${option.timeout}
  uuid: d3cb6fc3-4403-4ac9-8e38-22ceddd32c3d

@jtobard jtobard self-assigned this Jul 22, 2019

jtobard added a commit that referenced this issue Jul 24, 2019

gschueler added a commit that referenced this issue Jul 30, 2019

Merge pull request #5084 from rundeck/issue/5046
Referenced Job resolve variables on timeout field #5046

@gschueler gschueler added this to the 3.1.0 milestone Jul 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.