Bug 802346 - Wait for PostgreSQL socket to be available to prevent Puppet database init errors
Wait for PostgreSQL socket to be available to prevent Puppet database init er...
Status: CLOSED CURRENTRELEASE
Product: CloudForms Common
Classification: Red Hat
Component: puppet (Show other bugs)
1.0.0
Unspecified Unspecified
urgent Severity urgent
: beta6
: ---
Assigned To: Lukas Zapletal
Katello QA List
:
Depends On: 783193
Blocks: 703617 806028
  Show dependency treegraph
 
Reported: 2012-03-12 06:14 EDT by Lukas Zapletal
Modified: 2012-04-26 20:31 EDT (History)
7 users (show)

See Also:
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-26 20:31:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Lukas Zapletal 2012-03-12 06:15:38 EDT
Implementing workaround (waiting until psql comes up).
Comment 2 Lukas Zapletal 2012-03-12 10:43:41 EDT
08a13f4 802346 - wait until PostgreSQL accepts connections

Pushing upstream fix.
Comment 3 Lukas Zapletal 2012-03-12 10:44:06 EDT
QA note: To validate see this: https://bugzilla.redhat.com/show_bug.cgi?id=783193
Comment 4 Jeff Weiss 2012-03-12 13:12:25 EDT
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 09:04:26 EDT
Fixing component, taking again. Thanks Jeff.
Comment 6 Lukas Zapletal 2012-03-19 10:17:23 EDT
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 11:57:45 EDT
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 07:34:44 EDT
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 14:05:47 EDT
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.

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