Skip to content

Automatically stopping containers - does it actually work? #72

@debarshiray

Description

@debarshiray

This is in the context of containers/toolbox#114

I saw that coreos/toolbox always calls podman stop once the podman exec session terminates. I suppose the idea is that the stop will continue to fail until there are other exec sessions around, and the final stop will actually terminate the container.

But, does it actually work this way in practice?

I was playing with this a bit recently. It seems that regardless of whether there are exec sessions around or not, stop always sends a signal to the container's entry point.

For example, if you have:

$ podman run --rm -it registry.fedoraproject.org/fedora:34 /bin/bash

... then a podman stop ... will quit the shell.

Sometimes, when there are actual exec sessions around, I do get this error from podman stop:

"container %s has active exec sessions, refusing to clean up"

... but it doesn't seem consistent. Sometimes the exec sessions also end up getting terminated.

Any thoughts? :)

Is this the expected behaviour? Did Podman change behaviour in some way? Or am I missing something obvious?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions