sclorg / postgresql-container

PostgreSQL container images based on Red Hat Software Collections and intended for OpenShift and general usage. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
http://softwarecollections.org
Apache License 2.0
164 stars 216 forks source link

Gracefully shut down the original container #543

Closed hhorak closed 10 months ago

hhorak commented 10 months ago

With keeping the container running, we see SELinux error messages and a sudden crash of the PostgreSQL container. Let's properly shut down the container before using its volume privately mounted into a different container.

This should fix #536 and also reverts previous attempt (#538) to fix the issues with SELinux messages.

Background: podman's :Z modificator for volumes works the way that the latest container run with the same volume directory mounted with :Z modificator has access, the previous containers are kept running, but access to the shared directory is suddenly removed. That caused the first instance of PostgreSQL server to crash with SIGSEGV actually, while triggering some SELinux error message during that.

Related to #542.

hhorak commented 10 months ago

[test]