Bug 802346

Summary: Wait for PostgreSQL socket to be available to prevent Puppet database init errors
Product: [Retired] CloudForms Common Reporter: Lukas Zapletal <lzap>
Component: puppetAssignee: Lukas Zapletal <lzap>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 1.0.0CC: cpelland, cwelton, esammons, gkhachik, jlaska, lzap, wili
Target Milestone: beta6   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 783193 Environment:
Red Hat Enterprise Linux Server release 6.2 (Santiago) katello-cli-headpin-0.1.13-2.el6.noarch katello-certs-tools-1.0.1-2.el6.noarch candlepin-tomcat6-0.5.10-1.el6.noarch katello-common-0.1.180-2.el6.noarch katello-headpin-0.1.125-2.el6.noarch katello-configure-0.1.52-2.el6.noarch katello-repos-0.1.4-1.el6.noarch katello-cli-common-0.1.34-2.el6.noarch candlepin-0.5.10-1.el6.noarch katello-glue-candlepin-0.1.180-2.el6.noarch katello-headpin-all-0.1.125-2.el6.noarch thumbslug-0.0.21-1.el6.noarch
Last Closed: 2012-04-27 00:31:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 783193    
Bug Blocks: 703617, 806028    

Comment 1 Lukas Zapletal 2012-03-12 10:15:38 UTC
Implementing workaround (waiting until psql comes up).

Comment 2 Lukas Zapletal 2012-03-12 14:43:41 UTC
08a13f4 802346 - wait until PostgreSQL accepts connections

Pushing upstream fix.

Comment 3 Lukas Zapletal 2012-03-12 14:44:06 UTC
QA note: To validate see this: https://bugzilla.redhat.com/show_bug.cgi?id=783193

Comment 4 Jeff Weiss 2012-03-12 17:12:25 UTC
Lukas - had to revert your fix, causes katello-configure to error out right away with:

'for i in {1..6}; do /usr/bin/psql -U postgres -h localhost -c 'select count(*) from pg_tables' >/dev/null 2>&1 || sleep 5; done' is not qualified and no path was specified. Please qualify the command or specify a path.

Comment 5 Lukas Zapletal 2012-03-19 13:04:26 UTC
Fixing component, taking again. Thanks Jeff.

Comment 6 Lukas Zapletal 2012-03-19 14:17:23 UTC
Finally delivering a fix

caef237 802346 - wait for postgres to come up in puppet

plus adding syntax check during our katello-configure rpm build:

f58725d 802346 - adding puppet syntax check to the spec

so we prevent syntax errors in future. Added two build requires (puppet and findutils).

Comment 7 Lukas Zapletal 2012-03-19 15:57:45 UTC
Damn I had to revert it once again!

Puppet issues. err: Could not apply complete catalog: Found dependency cycles in the following relationships ... tons of errors. I generated a graph but I dont see any cycles there.

http://lzap.fedorapeople.org/projects/katello/graphs/puppet_of_0.2_13.png

Comment 9 Lukas Zapletal 2012-03-20 11:34:44 UTC
2afb6b8 802346 - wait for postgres to come up in puppet

Had to fine tune ordering and dependencies. Now it is working again.

Comment 15 Corey Welton 2012-04-03 18:05:47 UTC
Marking QA Verified - see bug #806028 for test methodology.  If you do not agree with the test methods or are dissatisfied with the results/effort, please reopen.