Bug 1520319

Summary: Add Candlepin db verify step for 6.3 GA
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: Docs Upgrading and Updating Red Hat SatelliteAssignee: Stephen Wadeley <swadeley>
Status: CLOSED NEXTRELEASE QA Contact: Melanie Corr <mcorr>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: lzap, swadeley
Target Milestone: UnspecifiedKeywords: FieldEngineering, PrioBumpField
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-18 16:48:27 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: 1519904    
Bug Blocks: 1520326, 1533259    

Description Lukas Zapletal 2017-12-04 09:15:47 UTC
We have found that in some circumstances, upgrade can fail due to Candlepin database migration. There is an external checker script that will verify database consistency which must be incorporated into upgrade process. Please add the following:

/usr/share/candlepin/cpdb --validate

In case of error, please do not carry on with upgrade process and contact Red Hat support. The step is required, our pre-upgrade tool will check if it was executed before upgrade.

WARNING: Utility cpdb and validation option was introduced in Satellite 6.2.14. If the utility is not available (e.g. during 6.3 beta period), perform these steps:

wget https://github.com/candlepin/candlepinproject.org/raw/master/binaries/cpvalidation.zip
unzip cpvalidation.zip
liquibase --classpath=/usr/share/java/postgresql-jdbc.jar:./cpvalidation --changeLogFile=./cpvalidation/changelog-validate.xml --driver=org.postgresql.Driver --url=jdbc:postgresql:candlepin --username=candlepin --password=$(grep org.quartz.dataSource.myDS.password /etc/candlepin/candlepin.conf | cut -d= -f2) --logLevel=debug migrate 2>&1 | tee -a /var/log/candlepin/cpdb.log

Comment 1 Lukas Zapletal 2017-12-04 09:29:05 UTC
Please unwrap comments, these are three different shell commands.

For more info: https://github.com/candlepin/candlepinproject.org/blob/master/docs/candlepin/database_validation.md

Comment 7 Lukas Zapletal 2018-01-08 14:12:53 UTC
Please track progress of this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1519904 when it reaches ON_QA the RPMs are ready to be tested.

Comment 8 Stephen Wadeley 2018-01-08 14:25:58 UTC
(In reply to Lukas Zapletal from comment #7)
> Please track progress of this BZ:
> https://bugzilla.redhat.com/show_bug.cgi?id=1519904 when it reaches ON_QA
> the RPMs are ready to be tested.

ACK, thanks

Comment 12 Stephen Wadeley 2018-02-07 12:42:39 UTC
Bug 1542950 - Improve error handling for cpdb