Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1194997 - error while Satellite 6 installation: /Stage[main]/Candlepin::Database::Postgresql/Exec[cpdb]: Failed to call refresh: liquibase --driver=org.postgresql.Driver...
Summary: error while Satellite 6 installation: /Stage[main]/Candlepin::Database::Postg...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Devan Goodwin
QA Contact: jaudet
URL:
Whiteboard:
: 1194819 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-21 20:17 UTC by Jan Hutař
Modified: 2017-02-23 20:27 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:26:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description Jan Hutař 2015-02-21 20:17:11 UTC
Description of problem:
There is an ERROR being logged when katello-installer is run:

# less /var/log/katello-installer/katello-installer.log
[...]
[DEBUG 2015-02-21 00:48:22 main]  Executing 'liquibase --driver=org.postgresql.Driver                             --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/                        
     --changeLogFile=db/changelog/changelog-create.xml                             --url=jdbc:postgresql:candlepin                             --username=candlepin                              --password=VaYRnZpqJtEAM8moBoa9SzQ52oR9xZxD 
                            migrate                             -Dcommunity=False                             >> /var/log/candlepin/cpdb.log                             2>&1 && touch /var/lib/candlepin/cpdb_done'
[ERROR 2015-02-21 00:48:26 main]  /Stage[main]/Candlepin::Database::Postgresql/Exec[cpdb]: Failed to call refresh: liquibase --driver=org.postgresql.Driver                             --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/                             --changeLogFile=db/changelog/changelog-create.xml                             --url=jdbc:postgresql:candlepin                             --username=candlepin                              --password=VaYRnZpqJtEAM8moBoa9SzQ52oR9xZxD                             migrate                             -Dcommunity=False                             >> /var/log/candlepin/cpdb.log                             2>&1 && touch /var/lib/candlepin/cpdb_done returned 255 instead of one of [0]
[ERROR 2015-02-21 00:48:26 main]  /Stage[main]/Candlepin::Database::Postgresql/Exec[cpdb]: liquibase --driver=org.postgresql.Driver                             --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/                             --changeLogFile=db/changelog/changelog-create.xml                             --url=jdbc:postgresql:candlepin                             --username=candlepin                              --password=VaYRnZpqJtEAM8moBoa9SzQ52oR9xZxD                             migrate                             -Dcommunity=False                             >> /var/log/candlepin/cpdb.log                             2>&1 && touch /var/lib/candlepin/cpdb_done returned 255 instead of one of [0]
[ INFO 2015-02-21 00:48:26 main] /usr/lib/ruby/site_ruby/1.8/puppet/util/errors.rb:104:in `fail'
[...]


Version-Release number of selected component (if applicable):
Satellite-6.1.0-RHEL-6-20150220.0-Satellite-x86_64


How reproducible:
1 of 1


Steps to Reproduce:
1. # katello-installer --foreman-admin-email 'root@localhost' --foreman-admin-username 'admin' --foreman-admin-password '...'


Actual results:
Error is logged


Expected results:
No errors logged


Additional info:
# cat /var/log/candlepin/cpdb.log
INFO 2/21/15 12:48 AM:liquibase: Successfully acquired change log lock
INFO 2/21/15 12:48 AM:liquibase: Creating database history table with name: databasechangelog
INFO 2/21/15 12:48 AM:liquibase: Reading from databasechangelog
INFO 2/21/15 12:48 AM:liquibase: Reading from databasechangelog
INFO 2/21/15 12:48 AM:liquibase: Successfully released change log lock
Liquibase Update Failed: Validation Failed:
     1 changes have validation failures
          addForeignKeyConstraint is not supported on postgresql, db/changelog/20150123105016-add-consumer-checkin-table.xml::20150123105016-1::dgoodwin::(Checksum: 3:ef15d24f295f43442a692f544ed5efe0)

SEVERE 2/21/15 12:48 AM:liquibase: Validation Failed:
     1 changes have validation failures
          addForeignKeyConstraint is not supported on postgresql, db/changelog/20150123105016-add-consumer-checkin-table.xml::20150123105016-1::dgoodwin::(Checksum: 3:ef15d24f295f43442a692f544ed5efe0)

liquibase.exception.ValidationFailedException: Validation Failed:
     1 changes have validation failures
          addForeignKeyConstraint is not supported on postgresql, db/changelog/20150123105016-add-consumer-checkin-table.xml::20150123105016-1::dgoodwin::(Checksum: 3:ef15d24f295f43442a692f544ed5efe0)

	at liquibase.changelog.DatabaseChangeLog.validate(Unknown Source)
	at liquibase.Liquibase.update(Unknown Source)
	at liquibase.integration.commandline.Main.doMigration(Unknown Source)
	at liquibase.integration.commandline.Main.main(Unknown Source)


For more information, use the --logLevel flag)

Comment 3 Devan Goodwin 2015-02-23 13:26:45 UTC
This looks like it's caused by an issue with older versions of liquibase that don't know how to handle this. Satellite is using liquibase 2, we've moved onward to 3 and the builds are available in our buildroot.

Would it be possible to tag in liquibase-3.1.0-1? Dependencies are exactly the same.


bash-4.1# rpm -i liquibase-2.0.5-2.el6sat.noarch.rpm 
warning: liquibase-2.0.5-2.el6sat.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
bash-4.1# rpm -q --requires liquibase
/bin/sh  
java >= 0:1.6.0
jpackage-utils  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1



bash-4.1# rpm -qa | grep liquibase
liquibase-3.1.0-1.el6_5.noarch
bash-4.1# rpm -q --requires liquibase
/bin/sh  
java >= 0:1.6.0
jpackage-utils  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


The schema deploys fine with 3, which is how this was missed.

Comment 4 Devan Goodwin 2015-02-23 13:36:06 UTC
Cancel that, the liquibase update would be easy and we probably should do it, but I can fix with a new candlepin build and frankly it looks like it's probably the safer bet. No tagging required, rebuilding candlepin now.

Comment 5 Devan Goodwin 2015-02-23 14:00:45 UTC
*** Bug 1194819 has been marked as a duplicate of this bug. ***

Comment 6 Devan Goodwin 2015-02-23 14:29:33 UTC
Please tag in: candlepin-0.9.43-1.el6 and candlepin-0.9.43-1.el7

This should correct the problem.

Technically it would be good to pick up liquibase-3.1.0-1 as well but I'll leave that to sat rel-eng.

Comment 9 jaudet 2015-03-10 13:26:24 UTC
Tested against systems running Satellite-6.1.0-RHEL-6-20150303.0 and Satellite-6.1.0-RHEL-7-20150303.0. Identical results were produced on both systems.

    $ grep -i 'debug.*liquibase' /var/log/katello-installer/* | wc -l
    4
    $ grep -i 'error.*liquibase' /var/log/katello-installer/* | wc -l
    0

Comment 10 Bryan Kearney 2015-08-11 13:31:40 UTC
This bug is slated to be released with Satellite 6.1.

Comment 11 errata-xmlrpc 2015-08-12 05:26:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592


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