Uh oh!
There was an error while loading. Please reload this page.
Add timeout field to hooks - #346
Conversation
So that runtimes don't lock up forever waiting on a hook to return I added a timeout field. This allows the author to specify the timeout in seconds that they want the hook to run before aborting the hook and container execution. I think the hook is the proper place to specify a timeouot like this because any type of overall timeout in the runtime will probably not work for all hooks and will not be flexable enough. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
vishh
commented
Mar 16, 2016
This change makes sense. But adding a create step feels like a better solution :) |
wking
commented
Mar 16, 2016
On Wed, Mar 16, 2016 at 04:54:22PM -0700, Michael Crosby wrote:
I'd rather folks used ‘timeout’ 1 or similar in the hook itself. |
crosbymichael
commented
Mar 17, 2016
@wking i don't think that is a good general solution for everyone. having this enforced by the runtime seems better and we don't have to rely on an external binary. |
marcosnils
commented
Mar 17, 2016
Agree with @crosbymichael. It helps when developing a spec implementation for multiple platforms. |
| @@ -226,6 +226,7 @@ If a hook returns a non-zero exit code, then an error is logged and the remainin | |||
| "poststart": [ | |||
| { | |||
| "path": "/usr/bin/notify-start" | |||
There was a problem hiding this comment.
adding that line will require a comma on the end of this line
vbatts
commented
Mar 17, 2016
While we have hooks, this LGTM, |
wking
commented
Mar 17, 2016
On Wed, Mar 16, 2016 at 05:02:38PM -0700, Michael Crosby wrote:
I don't think this argument scales particularly well. The GNU Core And hooks are setup / audited by the runtime-caller right 4? They |
wking
commented
Mar 17, 2016
On Wed, Mar 16, 2016 at 06:42:33PM -0700, Vincent Batts wrote:
Breaking create / (exec|start) doesn't get you out of hooks entirely, |
vishh
commented
Mar 17, 2016
This PR is not the place to talk about hooks. @wking it will be helpful if On Wed, Mar 16, 2016 at 9:00 PM, W. Trevor King notifications@github.com
|
hqhq
commented
Mar 18, 2016
It makes sense for me, LGTM. |
mrunalp
commented
Mar 18, 2016
LGTM |
So that runtimes don't lock up forever waiting on a hook to return I
added a timeout field. This allows the author to specify the timeout in
seconds that they want the hook to run before aborting the hook and
container execution.
I think the hook is the proper place to specify a timeouot like this
because any type of overall timeout in the runtime will probably not
work for all hooks and will not be flexable enough.
Let me know that you all think.
Signed-off-by: Michael Crosby crosbymichael@gmail.com