Bug 1696732 - Persistent Postgres Upgrade using Gluster File PVs fails on Socket Issue [rh-postgresql10]
Summary: Persistent Postgres Upgrade using Gluster File PVs fails on Socket Issue [rh-...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: rh-postgresql10-container
Version: rh-postgresql10
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
: 3.4
Assignee: Patrik Novotný
QA Contact: rhscl image testing
URL:
Whiteboard:
Depends On:
Blocks: 1813215 1813371
TreeView+ depends on / blocked
 
Reported: 2019-04-05 14:12 UTC by Matthew Robson
Modified: 2023-09-07 19:53 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1813215 1813371 (view as bug list)
Environment:
Last Closed: 2021-02-10 12:47:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Matthew Robson 2019-04-05 14:12:39 UTC
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:

Comment 2 Petr Kubat 2019-04-08 10:44:32 UTC
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

Comment 18 Honza Horak 2021-02-10 12:47:34 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.