-
Notifications
You must be signed in to change notification settings - Fork 554
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
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 <[email protected]>
This change makes sense. But adding a create step feels like a better solution :) |
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. |
@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. |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding that line will require a comma on the end of this line
While we have hooks, this LGTM, |
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 |
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, |
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 [email protected]
|
It makes sense for me, LGTM. |
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 [email protected]