Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1194997 - error while Satellite 6 installation: /Stage[main]/Candlepin::Database::Postgresql/Exec[cpdb]: Failed to call refresh: liquibase --driver=org.postgresql.Driver...
error while Satellite 6 installation: /Stage[main]/Candlepin::Database::Postg...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Candlepin (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: Unused
Assigned To: Devan Goodwin
jaudet
: Triaged
: 1194819 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-21 15:17 EST by Jan Hutař
Modified: 2017-02-23 15:27 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-12 01:26:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1592 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 05:04:35 EDT

  None (edit)
Description Jan Hutař 2015-02-21 15:17:11 EST
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 08:26:45 EST
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 08:36:06 EST
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 09:00:45 EST
*** Bug 1194819 has been marked as a duplicate of this bug. ***
Comment 6 Devan Goodwin 2015-02-23 09:29:33 EST
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 09:26:24 EDT
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 09:31:40 EDT
This bug is slated to be released with Satellite 6.1.
Comment 11 errata-xmlrpc 2015-08-12 01:26:56 EDT
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.