Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1501846

Summary: Installation fails in disconnected environment
Product: Red Hat Satellite Reporter: Johan Swensson <kupo>
Component: CandlepinAssignee: Alex Wood <awood>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: awood, bbuckingham, bcourt, cdonnell, cwelton, ehelms, jswensso, khowell, kupo, mstead, sjagtap
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: candlepin-2.1.14-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1503164 1540672 (view as bug list) Environment:
Last Closed: 2018-02-21 16:54:17 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:
Bug Depends On: 1503164    
Bug Blocks: 1540672    
Attachments:
Description Flags
additional logs none

Description Johan Swensson 2017-10-13 10:32:52 UTC
Created attachment 1338182 [details]
additional logs

Description of problem:
Candlepin tries to fetch a xsd directly from liquibase.org

Version-Release number of selected component (if applicable):
6.3 snap19

How reproducible:
Every time in a disconnected environment

Steps to Reproduce:
1. Try install Satellite in a disconnected environment, in my lab I had a proxy configured with --katello-proxy-port and --katello-proxy-url but it still fails.

Actual results:
Installation fails with 

liquibase.exception.ChangeLogParseException: Error parsing line 7 column 75 of db/changelog/20170220102027-add-id-column-for-productcontent.xml: schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(Unknown Source)
        at liquibase.parser.core.xml.XMLChangeLogSAXHandler.handleIncludedChangeLog(Unknown Source)
        at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
 liquibase --driver=org.postgresql.Driver                             --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat/webapps/candlepin/WEB-INliquibase.exception.ChangeLogParseException: Error parsing line 7 column 75 of db/changelog/20170220102027-add-id-column-for-productcontent.xml: schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(Unknown Source)
        at liquibase.parser.core.xml.XMLChangeLogSAXHandler.handleIncludedChangeLog(Unknown Source)
        at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
F/classes/                             --changeLogFile=db/changelog/changelog-create.xml                             --url=jdbc:postgresql://localhost:5432/candlepin                             --username=candlepin                              --password=sKB5g2nrg65VPbP2Es5GitcTWHcvWt6g                             migrate                             -Dcommunity=False                             >> /var/log/candlepin/cpdb.log                             2>&1 && touch /var/lib/candlepin/cpdb_done returned 255 instead of one of [0]
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:160:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:236:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in `sync_if_needed'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:88:in `block in perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:230:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:246:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:386:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:385:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/share/gems/gems/kafo-2.0.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:142:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:222:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:241:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:350:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:241:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:540:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
 /Stage[main]/Candlepin::Database::Postgresql/Exec[cpdb]/returns: change from notrun to 0 failed: liquibase --driver=org.postgresql.Driver                             --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat/webapps/candlepin/WEB-INF/classes/                             --changeLogFile=db/changelog/changelog-create.xml                             --url=jdbc:postgresql://localhost:5432/candlepin                             --username=candlepin                              --password=sKB5g2nrg65VPbP2Es5GitcTWHcvWt6g                             migrate                             -Dcommunity=False                             >> /var/log/candlepin/cpdb.log                             2>&1 && touch /var/lib/candlepin/cpdb_done returned 255 instead of one of [0]


Expected results:
Installation should succeed, anything should be fetched via the configured proxy, tho I'm not really sure why we try to fetch this file from a 3rd party site at all.

Comment 1 jcallaha 2017-10-13 15:28:00 UTC
Are you sure that you have included everything Satellite needs to install? Are you using an ISO? What is your process of moving satellite's requirements/packages to the disconnected server?

Comment 2 Johan Swensson 2017-10-13 15:38:49 UTC
Yes I'm sure, also the error in /var/log/candlepin/cpdb.log (attached in the tarball) makes it very clear. I'm using the bits from the dogfood server, not ISO.

Comment 3 Johan Swensson 2017-10-13 22:27:03 UTC
Since I have control over my lab network I also went back and enabled direct Internet access temporarily to double check and that did indeed make the installation succeed.

Comment 8 Alex Wood 2017-10-20 13:54:58 UTC
Users encountering this bug can fix it manually using sed:

$ sed -i '1,10s/3.5.xsd/3.1.xsd/' /var/lib/tomcat/webapps/candlepin/WEB-INF/classes/db/changelog/*.xml

Comment 14 Barnaby Court 2018-02-01 02:40:24 UTC
Build has been completed upstream with an updated patch in version 2.1.14

Comment 16 Sanket Jagtap 2018-02-07 14:10:27 UTC
Build: Satellite 6.3.0 snap 35

[root@hp-sl4540gen8-01 log]# rpm -qa | grep candlepin
candlepin-selinux-2.1.14-1.el7.noarch
candlepin-2.1.14-1.el7.noarch


Verified, there were no error in the installer , and the satellite was installed

Comment 17 Satellite Program 2018-02-21 16:54:17 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-2018:0336