Red Hat Bugzilla – Bug 753866
DB Upgrade needs more work for existing drift records
Last modified: 2011-12-13 14:23:39 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.
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.)
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.
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,
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.
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
- 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
- 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:
- The upgrade issues are mainly drift related. Having drift data
(some definitions with snapshots) in the db is needed.
*** This bug has been marked as a duplicate of bug 751778 ***