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.
i think mentioning that (and also that one can still see the stopped
container with "podman container ls -a") would make things clearer.
Podman mailing list -- podman(a)lists.podman.io
To unsubscribe send an email to podman-leave(a)lists.podman.io