Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1696732 - Persistent Postgres Upgrade using Gluster File PVs fails on Socket Issue
Summary: Persistent Postgres Upgrade using Gluster File PVs fails on Socket Issue
Keywords:
Status: NEW
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: alpha
: 3.3
Assignee: Patrik Novotný
QA Contact: Lukas Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-05 14:12 UTC by Matthew Robson
Modified: 2019-04-08 10:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


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


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