-
Notifications
You must be signed in to change notification settings - Fork 61
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
Configurable stop/kill behavior on crane run -r
, crane lift -r
, crane rm -f
& crane stop
#43
Comments
crane lift -r
, crane rm -f
& crane stop
crane run -r
, crane lift -r
, crane rm -f
& crane stop
Yea I thought about something similar, but decided to implement just I thought about adding an optional I didn't implement this because You're idea of a default time for recreate (that's how I would see it as) sounds good though. |
Maybe I wasn't clear, but mapping the
Agreed it's not a priority right now, and in no way a showstopper for, but I wanted to get the conversation started. |
Ah, somehow I missed that in the first post. So yea, seems like we had the same idea :) I'm still unsure about |
Maybe |
About your last comment, why would I want to precisely override the grace period? Either I want to respect what the config says (since the config maintainer knows better what is a sensible timeout), or just kill it right away. That was my point 2). I don't really feel the need for introducing a runtime flag controlling the |
I think my main concern is that by just offering a So, I'm all in for adding a Maybe adding the |
Closing this, as the current solution is probably enough, and because https://github.com/dotcloud/docker/pull/6987/files shows that by the next release of docker |
Oh nice! |
@michaelsauter actually that initial PR was reverted in moby/moby#7374, so it's still |
Yup, that sounds reasonably. I'll do that. |
Changed in d52a3f6. |
Just a suggestion regarding the now-default kill behavior of
run
&lift
on--recreate
: could this be configurable per container, utilizing the crane config? After all, it's up to the config maintainer to decide whether a gracefulstop
is required (mounted volumes or other side effects outside the container, ongoing requests, etc) or akill
is enough.To implement that,
rm
would have a--force
instead of--kill
(mapping docker semantics), and a new per-container optionstop-grace-period
(potentially set to0
) would control the default timeout passed todocker stop
(used by all code paths potentially stopping a container).lift [-r]
would then become[docker stop -t stop-grace-period && docker rm &&] provision && run
. If someone really wants to kill a container despite what the config says,crane kill
is still there.The text was updated successfully, but these errors were encountered: