Bug 1249392

Summary: Rewriting Candlepin config redundantly tries to create its db in postgres
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: InstallationAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED WORKSFORME QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: 6.0.8CC: stbenjam
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-25 17:00:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Moravec 2015-08-02 12:15:19 UTC
Description of problem:
Sequence of:
- katello-installer
- modifying candlepin.conf (i.e. enable debugs, whatever)
- katello-installer

fails with error:

 /Stage[main]/Candlepin::Database/Postgresql::Server::Db[candlepin]/Postgresql::Server::Database[candlepin]/Exec[/usr/bin/createdb --port='5432' --owner='postgres' --template=template0  'candlepin']: Failed to call refresh: /usr/bin/createdb --port='5432' --owner='postgres' --template=template0  'candlepin' returned 1 instead of one of [0]


I assume the createdb of candlepin db is triggered by puppet that realized /etc/candlepin/candlepin.conf needs to be updated (as file has been changed). This dependency "fix config => createdb" sounds redundant - can't it even reset/break something? What else redundantly depends on the "fix config" step?
 

Version-Release number of selected component (if applicable):
katello-installer-0.0.67-1.el6sat.noarch
(noticed in Sat6.0.8, expected on 6.1beta as well)


How reproducible:
100%


Steps to Reproduce:
On a fresh machine:

katello-installer
echo >> /etc/candlepin/candlepin.conf
katello-installer


Actual results:
2nd installer fails with:

 /Stage[main]/Candlepin::Database/Postgresql::Server::Db[candlepin]/Postgresql::Server::Database[candlepin]/Exec[/usr/bin/createdb --port='5432' --owner='postgres' --template=template0  'candlepin']: Failed to call refresh: /usr/bin/createdb --port='5432' --owner='postgres' --template=template0  'candlepin' returned 1 instead of one of [0]
 /Stage[main]/Candlepin::Database/Postgresql::Server::Db[candlepin]/Postgresql::Server::Database[candlepin]/Exec[/usr/bin/createdb --port='5432' --owner='postgres' --template=template0  'candlepin']: /usr/bin/createdb --port='5432' --owner='postgres' --template=template0  'candlepin' returned 1 instead of one of [0]


Expected results:
no error

Additional info:

Comment 2 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 3 Bryan Kearney 2016-07-26 15:42:09 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 5 Stephen Benjamin 2016-08-25 17:00:13 UTC
Seems to be fixed on Satellite 6.2 GA.