-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 support for passing container stop timeout as -1 (infinite) #19425
Conversation
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.
LGTM
@containers/podman-maintainers PTAL |
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.
This will only work for the compat API, however I think it would make more sense to correctly support this in libpod. For example podman stop -t -1
is still not supported after that.
@@ -43,7 +43,8 @@ func StopContainer(w http.ResponseWriter, r *http.Request) { | |||
} | |||
} else { | |||
if _, found := r.URL.Query()["t"]; found { | |||
options.Timeout = &query.DockerTimeout | |||
timeout := uint(query.DockerTimeout) |
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.
Doesn't this technically only cause a overflow?
I mean wait for 18446744073709551615
seems more than good enough for wait unlimited but a comment would help to make clear that we only set the timeout to some high value
Can not support the remote bindings in libpod without a breaking change. |
039c549
to
997bc49
Compare
We're always free to add a new parameter to avoid a breaking change. Not ideal for purists but a pragmatic means to add features without breaking. |
6c79d55
to
6331aa5
Compare
Compat api for containers/stop should take -1 value Add support for `podman stop --time -1` Add support for `podman restart --time -1` Add support for `podman rm --time -1` Add support for `podman pod stop --time -1` Add support for `podman pod rm --time -1` Add support for `podman volume rm --time -1` Add support for `podman network rm --time -1` Fixes: containers#17542 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
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.
LGTM
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, Luap99, rhatdan, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add support for
podman stop --time -1
Add support for
podman restart --time -1
Add support for
podman rm --time -1
Add support for
podman pod stop --time -1
Add support for
podman pod rm --time -1
Add support for
podman volume rm --time -1
Add support for
podman network rm --time -1
Fixes: #17542
Does this PR introduce a user-facing change?