Skip to content
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

Gracefully shut down the original container #543

Merged
merged 2 commits into from
Jan 6, 2024

Conversation

hhorak
Copy link
Member

@hhorak hhorak commented Jan 4, 2024

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 added 2 commits January 4, 2024 20:45
…ume"

This reverts commit 62a0e88.

Creating a new volume directory was actually NOOP, because the variable
volume_options was not updated. What we need to get rid of SELinux
messages that this fix tried to address is to properly shut down
previous container. That will be done in the following commit.

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

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.
@hhorak
Copy link
Member Author

hhorak commented Jan 4, 2024

[test]

Copy link
Contributor

@zmiklank zmiklank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the thorough investigation and for great commit messages!

I have just one small note, see in inline comments.

test/run_test Show resolved Hide resolved
@zmiklank zmiklank merged commit 5a9f55d into sclorg:master Jan 6, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

avc: denied raised during the run_change_password_test
2 participants