Satellite 6 Running `cpdb` or `foreman-maintain upgrade check` failed on candlepin-validate-db
Issue
- Running the "Checking the Candlepin database step" from the "Upgrading Red Hat Satellite" guide returns an error.
- Running the upgrade check command throws an error for [candlepin-validate-db]
# foreman-maintain upgrade check --target-version 6.3
Running Checks before upgrading to Satellite 6.3
================================================================================
Check for paused tasks: [OK]
--------------------------------------------------------------------------------
Check whether all services are running using hammer ping: [OK]
--------------------------------------------------------------------------------
Check to validate candlepin database: [FAIL]
Failed executing /usr/share/candlepin/cpdb --validate --verbose -u 'candlepin' -p '[FILTERED]', exit status 1:
########## ERROR ############
Error running command: liquibase --driver=org.postgresql.Driver --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat/webapps/candlepin/WEB-INF/classes/ --changeLogFile=db/changelog/changelog-validate.xml --url=jdbc:postgresql:candlepin --username=candlepin --password=[FILTERED] --logLevel=debug migrate -Dcommunity=False
Status code: 65280
Command output: DEBUG 2/23/18 9:31 AM:liquibase: Connected to candlepin@jdbc:postgresql:candlepin
DEBUG 2/23/18 9:31 AM:liquibase: Setting auto commit to false from true
DEBUG 2/23/18 9:31 AM:liquibase: Executing QUERY database command: select count(*) from public.databasechangeloglock
DEBUG 2/23/18 9:31 AM:liquibase: Executing QUERY database command: SELECT LOCKED FROM public.databasechangeloglock WHERE ID=1
DEBUG 2/23/18 9:31 AM:liquibase: Lock Database
[...]
--driver=org.postgresql.Driver --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat/webapps/candlepin/WEB-INF/classes/ --changeLogFile=db/changelog/changelog-validate.xml --url=jdbc:postgresql:candlepin --username=candlepin --password=[FILTERED] --logLevel=debug
Traceback (most recent call last):
File "/usr/share/candlepin/cpdb", line 297, in <module>
dbsetup.validate()
File "/usr/share/candlepin/cpdb", line 70, in validate
self._run_liquibase("db/changelog/changelog-validate.xml")
File "/usr/share/candlepin/cpdb", line 106, in _run_liquibase
output = run_command("liquibase %s migrate -Dcommunity=%s" % (liquibase_options, self.community))
File "/usr/share/candlepin/cpdb", line 38, in run_command
error_out(command, status, output)
File "/usr/share/candlepin/cpdb", line 46, in error_out
raise Exception("Error running command")
Exception: Error running command
--------------------------------------------------------------------------------
Check for running tasks: [OK]
--------------------------------------------------------------------------------
Check for old tasks in paused/stopped state: [OK]
--------------------------------------------------------------------------------
Check for pending tasks which are safe to delete: [OK]
--------------------------------------------------------------------------------
Check for tasks in planning state: [OK]
--------------------------------------------------------------------------------
Check for recommended disk speed of pulp, mongodb, pgsql dir.:
/ Finished
Disk speed : 242 MB/sec [OK]
--------------------------------------------------------------------------------
Scenario [Checks before upgrading to Satellite 6.3] failed.
The following steps ended up in failing state:
[candlepin-validate-db]
Environment
Red Hat Satellite 6.2 running the pre-check for an upgrade to 6.3
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.