Bug 1540957 - [REGRESSION] postgresql pod fails on absent set_passwords command during deployment
Summary: [REGRESSION] postgresql pod fails on absent set_passwords command during depl...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: cfme-openshift-postgresql
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: GA
: 5.9.0
Assignee: Nick Carboni
QA Contact: Ievgen Zapolskyi
URL:
Whiteboard:
Depends On:
Blocks: 1498968 1544003
TreeView+ depends on / blocked
 
Reported: 2018-02-01 12:08 UTC by Ievgen Zapolskyi
Modified: 2018-09-25 19:13 UTC (History)
4 users (show)

Fixed In Version: 5.9.0.21
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1544003 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:22:42 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ievgen Zapolskyi 2018-02-01 12:08:31 UTC
Description of problem:
look at excerpt from logs below. 
It seems this procedure was either removed from ${CONTAINER_SCRIPTS_PATH}/common.sh or that bash script doesn't include appropriate script library.

Version-Release number of selected component (if applicable):
5.9.0.19

How reproducible:
100%

Steps to Reproduce:
1. try to deploy 5.9.0.19 and check postgresql pod logs


Additional info:
[root@cmqe-smicro-628-b09 utils]# oc logs -f postgresql-1-t87kd
/var/lib/pgsql/conf.d already exists on /var/lib/pgsql/data/userdata/postgresql.conf, skipping..
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....2018-02-01 11:38:25 UTC::5a72fc31.14:@:[20]:LOG:  redirecting log output to logging collector process
2018-02-01 11:38:25 UTC::5a72fc31.14:@:[20]:HINT:  Future log output will appear in directory "pg_log".
 done
server started
/usr/bin/run-postgresql: line 49: set_passwords: command not found

Comment 2 Dave Johnson 2018-02-01 16:05:16 UTC
Ievgen, any idea where we last saw this working?  I believe we ran automation against the pods the last build, right?  Was it working then?  Please add regression keyword if so, even if it was a few builds ago.

Comment 3 Ievgen Zapolskyi 2018-02-01 16:07:11 UTC
Dave, everything was ok in 5.9.0.18. Added regression keyword

Comment 4 Ievgen Zapolskyi 2018-02-05 17:20:04 UTC
The issue with set_passwords exists in 5.8.3.2 as well.

Comment 6 Nick Carboni 2018-02-06 16:11:54 UTC
This seems to be due to to SCL team's transition to using an s2i build strategy for dependent images. Specifically this change https://github.com/sclorg/postgresql-container/pull/208

We don't currently utilize s2i in any way, so fixing this looks like it will involve a significant amount of change to our current image.

Comment 7 Nick Carboni 2018-02-06 18:40:31 UTC
This will be fixed by the combination of https://github.com/ManageIQ/container-postgresql/pull/8 and https://github.com/ManageIQ/manageiq-pods/pull/264

The first PR changes the postgres image to utilize the new functionality in the SCL base image. In particular it drops a file into a pre-start hooks directory which makes the PG user we use a SUPERUSER.

The other PR changes where we mount the config map for our postgresql.conf customizations.

Together, they let us remove the overriden run-postgresql script in our image which was the source of the problem.

Comment 8 CFME Bot 2018-02-07 17:09:57 UTC
New commit detected on ManageIQ/manageiq-pods/master:
https://github.com/ManageIQ/manageiq-pods/commit/452908620f5ffefbd21f955a7732e03e29196697

commit 452908620f5ffefbd21f955a7732e03e29196697
Author:     Nick Carboni <ncarboni>
AuthorDate: Tue Feb 6 11:50:49 2018 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Tue Feb 6 13:28:31 2018 -0500

    Mount the configmap into the directory the new image expects
    
    This will be included into the main postgresql.conf automatically.
    Because this path is tied directly to the implementation, there is no
    reason to expose it to the user as a parameter.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1540957

 templates/miq-template.yaml | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comment 9 CFME Bot 2018-02-07 19:59:26 UTC
New commit detected on ManageIQ/manageiq-pods/gaprindashvili:
https://github.com/ManageIQ/manageiq-pods/commit/759f7a69351b039522b2e94b1e61012e098f07ce

commit 759f7a69351b039522b2e94b1e61012e098f07ce
Author:     Brandon Dunne <brandondunne>
AuthorDate: Wed Feb 7 12:05:06 2018 -0500
Commit:     Satoe Imaishi <simaishi>
CommitDate: Wed Feb 7 14:56:59 2018 -0500

    Merge pull request #264 from carbonin/fix_pg_pod
    
    Mount the configmap into the directory the new image expects
    (cherry picked from commit 6447370d0cbc3bba16ad03f9ce9bb004f758d634)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1540957

 templates/miq-template.yaml | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comment 12 Ievgen Zapolskyi 2018-02-15 11:21:40 UTC
fixed in 5.9.0.21

Comment 13 CFME Bot 2018-09-25 19:13:28 UTC
New commit detected on ManageIQ/manageiq-pods/hammer:

https://github.com/ManageIQ/manageiq-pods/commit/759f7a69351b039522b2e94b1e61012e098f07ce
commit 759f7a69351b039522b2e94b1e61012e098f07ce
Author:     Brandon Dunne <brandondunne>
AuthorDate: Wed Feb  7 12:05:06 2018 -0500
Commit:     Brandon Dunne <brandondunne>
CommitDate: Wed Feb  7 12:05:06 2018 -0500

    Merge pull request #264 from carbonin/fix_pg_pod

    Mount the configmap into the directory the new image expects
    (cherry picked from commit 6447370d0cbc3bba16ad03f9ce9bb004f758d634)

    https://bugzilla.redhat.com/show_bug.cgi?id=1540957

 templates/miq-template.yaml | 8 +-
 1 file changed, 1 insertion(+), 7 deletions(-)


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