Description of problem: When upgrading Postgres from 9.2, there is a selinux issue creating the socket if you're using a Gluster file backed PVC. It was discussed here: https://bugzilla.redhat.com/show_bug.cgi?id=1645687 But seems like it will end up as WONT_FIX. Customer is looking for an environment variable to set the socket file directory (unix_socket_directories) per the recommendations from the other BZ. Version-Release number of selected component (if applicable): Postgres 10 How reproducible: Always. Simple test: python -c "import socket as s; sock = s.socket(s.AF_UNIX); sock.bind('/foo/test.sock')" Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib64/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 13] Permission denied Steps to Reproduce: 1. Create postgres persistent container backed by a gluster / OCS file PVC 2. 3. Actual results: Permission denied to create the socket Expected results: While it should work, we are looking for a configurable to set the unix_socket_directories for the image. Additional info:
Unfortunately I cannot reproduce as I do not think I have an Openshift cluster backed by Gluster available. But if it is just about the customer to be able to set postgresql's unix_socket_directories configuration setting for the rh-postgresql10 image then one can do that without any further changes to the image template by using Openshift's source-to-image [1]. For some info on how to achieve this, please check: https://github.com/sclorg/postgresql-container/blob/generated/10/root/usr/share/container-scripts/postgresql/README.md#extending-image [1] https://docs.openshift.com/container-platform/3.11/architecture/core_concepts/builds_and_image_streams.html#source-build
Since the updated RPMs are already part of the container, I believe we can close this now. Feel free to re-open if the problem persists.