This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 753866 - DB Upgrade needs more work for existing drift records
DB Upgrade needs more work for existing drift records
Status: CLOSED DUPLICATE of bug 751778
Product: RHQ Project
Classification: Other
Component: Database (Show other bugs)
4.2
All All
unspecified Severity high (vote)
: ---
: RHQ 4.3.0
Assigned To: Jay Shaughnessy
Mike Foley
:
Depends On:
Blocks: 751778 753872 jon30-sprint10/rhq43-sprint10
  Show dependency treegraph
 
Reported: 2011-11-14 12:45 EST by Jay Shaughnessy
Modified: 2011-12-13 14:23 EST (History)
1 user (show)

See Also:
Fixed In Version: 4.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-13 14:23:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jay Shaughnessy 2011-11-14 12:45:19 EST
This is a continuation of work started for bug 751778.

For RHQ 4.2 to 4.3 db upgrades, when drift related tables have been
populated, there are some java-based upgrade steps that need to be
written and performed to complete the upgrade correctly. See the
TODOs in db-upgrade.xml, schema spec 1.115.
Comment 1 Jay Shaughnessy 2011-12-06 16:17:58 EST
master commit 64c7032453ec453246ffb3a9a2bcb664903be88e

This is to support RHQ 4.1 and 4.2 drift upgrades to 4.3.  It adds
two Java upgrade tasks and puts them into the existing 2.115 step. (JON
note, JON3.0 already places the db at 2.116 and the previous
version of 2.115 was already sufficient for JON3.0 purposes. We *do not*
want these new changes applied to JON3.0 upgrades and so I did not
create a new schema task for this, on purpose.)

Test Notes:
I've tested this in a simulated way on Postgres but not in a real
upgrade.  I have not tested this at all on Oracle although it is
written to handle Oracle-specific  syntax where needed.

After the upgrade the Administration-> Drift Templates page should
be inspected to make sure the templates look correct.
Comment 2 Jay Shaughnessy 2011-12-06 17:09:22 EST
moving back to ON_DEV

There are some more complications with RHQ43 upgrades.  RHQ 4.2 was
released with the wrong schema version (2.114, the same as RHQ 4.1).
This means that new 4.2 installs install a schema that is marked
as schema version 2.114 but whose schema actually reflects, I think,
2.115.

So,upgrades (meaning, installs choosing to keep existing data) from 4.1
to 4.2 are broken.  And upgrades from 4.2 to 4.3 are/will be broken.

I think upgrades from 4.1 to 4.3 will work.

Also, if a 4.2 install has its schema version manually updated to 
2.115 then an upgrade to 4.3 may work.

This is all related to the Drift feature's required schema.

More dev testing required here before releasing to QA.
Comment 3 Jay Shaughnessy 2011-12-08 16:56:24 EST
master commit dedfe6ad8738d1be1c5a411943e4e48d4410ffd2

More work to support 4.1 and 4.2 upgrades for drift.
- In the java template map upgrade task
  - add logic to generate the rhq_drift_def_template records
  - add logic to generate rhq_drift_set records for each initial 
    changeset
- Move some logic from 2.115 to 2.116 to make 2.115 match the
  schema produced by a 4.2 dbsetup (fresh db).  Note that prior to
  an upgrade 4.2 databases must (for now at least) be manually set
  to schema version 2.115.  They are errantly set to 2.114 in the 4.2
  release.

Test Notes
- The upgrades have not been tested on Oracle
- As mentioned above, you can not upgrade to 4.2. 4.2 requires a new db
- You can upgrade from 4.1 (or before,I suppose)
- You can upgrade from 4.2 assuming the db is set to schema version
  2.115 before the upgrade starts.  See the 4.3 release notes for
  more on what needs to be done:

http://rhq-project.org/display/RHQ/Release+Notes+4.3.0

- The upgrade issues are mainly drift related.  Having drift data
  (some definitions with snapshots) in the db is needed.
Comment 4 Mike Foley 2011-12-13 14:23:39 EST

*** This bug has been marked as a duplicate of bug 751778 ***

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