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 & Kill Job Does Not Halt Job Steps #2911

Closed
dirkniblick opened this Issue Nov 1, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@dirkniblick

dirkniblick commented Nov 1, 2017

Issue type: Bug report

My Rundeck detail

  • Rundeck version: 2.10.0-1
  • install type: RPM
  • OS Name/version: CentOS 7
  • DB Type/version: MySQL (MariaDB)

Expected Behavior
Per documentation: "You can set a maximum runtime for a job. If the runtime exceeds this value, the job will be halted (as if a user had killed it.)"

Actual Behavior
The execution halts, but the step(s) don't. Now, I realize the language up there doesn't say that the steps are halted, but I would assume that the execution halting while orphaning its steps is not "Expected Behavior" (it certainly wasn't to me).

How to reproduce Behavior
I created a job which runs a sleep statement on a remote host (via either a command or inline script) with a timeout set. The sleep command continues to run on the remote host after the job is timed out.

image

Also, I tried "killing" the job and the sleep statement just kept on going...

EDIT: This applies to jobs "executed locally" too.

@dirkniblick

This comment has been minimized.

dirkniblick commented Nov 1, 2017

Apparently, this sort of thing has been on the radar for awhile: #802 + #1038 + #1045 + #1238 + #2235

I realize I can create an ${option.timeout} and add "timeout ${option.timeout}" to the beginning of every command, but that seems really sloppy. I mean, I tried that, adding ${option.timeout} to the job's Timeout, but then the job shows as "Failed" rather than "Timed out".

Also, if a job has multiple steps, how do you setup a timeout for the whole job? Create ${option.timeout1}, ${option.timeout2}, ... and then "timeout ${option.timeout1} sleep 60", "timeout ${option.timeout2}" ...

@dirkniblick dirkniblick changed the title from Job Timeout Not Working to Job Timeout & Kill Job Does Not Halt Job Steps Nov 1, 2017

@ahonor

This comment has been minimized.

Contributor

ahonor commented Nov 14, 2017

One idea is to make timeout an inherent action for any kind of step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment