Bug 1501846 - Installation fails in disconnected environment
Summary: Installation fails in disconnected environment
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Alex Wood
QA Contact: Sanket Jagtap
URL:
Whiteboard:
Depends On: 1503164
Blocks: 1540672
TreeView+ depends on / blocked
 
Reported: 2017-10-13 10:32 UTC by Johan Swensson
Modified: 2019-04-01 20:27 UTC (History)
11 users (show)

Fixed In Version: candlepin-2.1.14-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1503164 1540672 (view as bug list)
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
additional logs (290.13 KB, application/x-gzip)
2017-10-13 10:32 UTC, Johan Swensson
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github candlepin candlepin pull 1892 0 None None None 2018-01-31 16:56:12 UTC

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


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