Bug 1263671 - [openshift/postgresql-92-rhel7] Postgresql slave pod restart several times until master is ready
[openshift/postgresql-92-rhel7] Postgresql slave pod restart several times un...
Product: OpenShift Origin
Classification: Red Hat
Component: Image (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Martin Nagy
Wenjing Zheng
Depends On:
  Show dependency treegraph
Reported: 2015-09-16 07:49 EDT by Wenjing Zheng
Modified: 2016-07-26 19:47 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-05-12 13:14:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Wenjing Zheng 2015-09-16 07:49:57 EDT
Description of problem:
When master pod is initiating, slave pod returns below error and restart several times:
[wzheng@openshiftqe db-templates]$ oc logs postgresql-slave-1-49xxn
Initializing PostgreSQL slave ...
pg_basebackup: could not connect to server: could not connect to server: Connection refused
	Is the server running on host "postgresql-master.clusterpql.svc.cluster.local." ( and accepting
	TCP/IP connections on port 5432?
[wzheng@openshiftqe db-templates]$ oc get pods
NAME                        READY     STATUS    RESTARTS   AGE
postgresql-master-1-nhubb   1/1       Running   0          3m
postgresql-slave-1-49xxn    1/1       Running   3          3m

Version-Release number of selected component (if applicable):
postgresql-92-rhel7 c10e6b2e643e
postgresql-92-centos7 8d440e45b666

How reproducible:

Steps to Reproduce:
1. Create pv with rhel7 nfs server on master
2. Create a project
3. Process and create below file 

Actual results:
Slave pod restarts several times until master is ready

Expected results:
It should have long enough time to wait for master start up

Additional info:
Comment 1 Martin Nagy 2015-09-16 08:01:40 EDT
We can add a wait_for_postgresql_master function, similar to what we have for MySQL https://github.com/openshift/mysql/blob/master/5.5/contrib/common.sh#L129
Comment 2 Martin Nagy 2015-09-17 06:54:13 EDT
Ben, what's the priority on this?
Comment 3 Ben Parees 2015-10-26 16:21:02 EDT
The priority is fairly low but it seems like an easy fix too, so please do see if you can get it off our list soon.
Comment 4 Martin Nagy 2015-11-12 06:41:49 EST
PR here: https://github.com/openshift/postgresql/pull/81
Comment 5 Ben Parees 2015-11-12 13:30:11 EST
PR has merged.
Comment 6 Wenjing Zheng 2015-11-13 05:17:27 EST
Verified with latest postgresql images:
rhscl/postgresql-94-rhel7   4613087b8514
openshift/postgresql-92-rhel7 8cad803a4e60
Comment 7 Pavel Raiskup 2015-11-13 06:01:58 EST
(In reply to Wenjing Zheng from comment #6)
> Verified with latest postgresql images:
> rhscl/postgresql-94-rhel7   4613087b8514

Where this image comes from?  We have:
rcm-img-docker01.build.eng.bos.redhat.com:5001/rhscl/postgresql-94-rhel7   latest              5ca02059038e        6 days ago          236 MB

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