couple questions about "podman pause"
first, what is the difference between "podman pause" and "podman stop", particularly since "man podman-pause" seems to confuse the two: OPTIONS --all, -a Pause all running containers. EXAMPLE ... snip ... Pause all running containers. podman stop -a ^^^^ so anyone reading "man podman-pause" is going to think that "stop" is a synonym, at least reading that example. in addition, "man podman-stop" doesn't help the situation by not distinguishing between paused and stopped containers: OPTIONS --all, -a Stop all running containers. This does not include paused con‐ tainers. second issue: $ podman pause musing_knuth Error: pause is not supported for rootless containers $ even if this is true, there is nothing in "man podman-pause" to suggest that this might occur, which is definitely grounds for confusion. rday
I'll give it a try, if Dan or Matt say differently, go with them. `podman pause` pauses the processes in the container and puts the container into the "Paused" state. You can kind of think of it as a flash freeze of the container. The `podman unpause` command unpauses the container and let's the processes continue running from the point they were at when they were paused. `podman stop` is a bigger hammer. It kills all the processes within the container and puts the container into the "Exited" state. The container can be restarted with `podman start` and all the processes in the container will have to restart from scratch. t On 1/26/20 1:33 PM, Robert P. J. Day wrote:
first, what is the difference between "podman pause" and "podman stop", particularly since "man podman-pause" seems to confuse the two:
OPTIONS --all, -a
Pause all running containers.
EXAMPLE
... snip ... Pause all running containers.
podman stop -a ^^^^
so anyone reading "man podman-pause" is going to think that "stop" is a synonym, at least reading that example.
in addition, "man podman-stop" doesn't help the situation by not distinguishing between paused and stopped containers:
OPTIONS --all, -a
Stop all running containers. This does not include paused con‐ tainers.
second issue:
$ podman pause musing_knuth Error: pause is not supported for rootless containers $
even if this is true, there is nothing in "man podman-pause" to suggest that this might occur, which is definitely grounds for confusion.
rday
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
On Wed, 29 Jan 2020, Tom Sweeney wrote:
I'll give it a try, if Dan or Matt say differently, go with them.
`podman pause` pauses the processes in the container and puts the container into the "Paused" state. You can kind of think of it as a flash freeze of the container. The `podman unpause` command unpauses the container and let's the processes continue running from the point they were at when they were paused.
`podman stop` is a bigger hammer. It kills all the processes within the container and puts the container into the "Exited" state. The container can be restarted with `podman start` and all the processes in the container will have to restart from scratch.
after playing for a bit, i did figure out most of this ... the one thing i *think* i verified and that would be worth putting in "man podman-stop" is that the overlay read-write layer is discarded upon stopping, so all changes during that session are thrown away (i verified this with "podman inspect" and "python -m json.tool"). i think mentioning that (and also that one can still see the stopped container with "podman container ls -a") would make things clearer. rday
On 2020-01-29 10:56, Robert P. J. Day wrote:
On Wed, 29 Jan 2020, Tom Sweeney wrote:
I'll give it a try, if Dan or Matt say differently, go with them.
`podman pause` pauses the processes in the container and puts the container into the "Paused" state. You can kind of think of it as a flash freeze of the container. The `podman unpause` command unpauses the container and let's the processes continue running from the point they were at when they were paused.
`podman stop` is a bigger hammer. It kills all the processes within the container and puts the container into the "Exited" state. The container can be restarted with `podman start` and all the processes in the container will have to restart from scratch.
after playing for a bit, i did figure out most of this ... the one thing i *think* i verified and that would be worth putting in "man podman-stop" is that the overlay read-write layer is discarded upon stopping, so all changes during that session are thrown away (i verified this with "podman inspect" and "python -m json.tool").
That sounds wrong - we shouldn't discard container changes until it's removed. If it's doing that, it's 100% a bug. Pause uses the Freezer cgroup to keep the processes of a container alive, but prevent them from executing. If you unpause, the container keeps going from whatever point it was paused at. Stop breaks out SIGTERM, and then SIGKILL if that fails, to cause all processes in the container to exit. Pause will not move the container to Exited state and set an exit code, Stop will do this. Thanks, Matt Heon
i think mentioning that (and also that one can still see the stopped container with "podman container ls -a") would make things clearer.
rday _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
On Wed, 29 Jan 2020, Matt Heon wrote:
On 2020-01-29 10:56, Robert P. J. Day wrote:
On Wed, 29 Jan 2020, Tom Sweeney wrote:
I'll give it a try, if Dan or Matt say differently, go with them.
`podman pause` pauses the processes in the container and puts the container into the "Paused" state. You can kind of think of it as a flash freeze of the container. The `podman unpause` command unpauses the container and let's the processes continue running from the point they were at when they were paused.
`podman stop` is a bigger hammer. It kills all the processes within the container and puts the container into the "Exited" state. The container can be restarted with `podman start` and all the processes in the container will have to restart from scratch.
after playing for a bit, i did figure out most of this ... the one thing i *think* i verified and that would be worth putting in "man podman-stop" is that the overlay read-write layer is discarded upon stopping, so all changes during that session are thrown away (i verified this with "podman inspect" and "python -m json.tool").
That sounds wrong - we shouldn't discard container changes until it's removed. If it's doing that, it's 100% a bug.
hang on ... i may have misread what i was looking at, so ignore that previous note. sorry. rday
participants (3)
-
Matt Heon -
Robert P. J. Day -
Tom Sweeney