Bug 785022
Summary: | Server upgrade fails if db-uprade.xml task is unable to created index when index already exists | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Larry O'Leary <loleary> | ||||||
Component: | Database, Installer | Assignee: | Jay Shaughnessy <jshaughn> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||||
Severity: | high | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 3.0.1 | CC: | hrupp, jshaughn, skondkar, spinder | ||||||
Target Milestone: | --- | ||||||||
Target Release: | JON 3.0.1 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 786252 (view as bug list) | Environment: |
JON 2.4.1 to JON 3.0.0 upgrade
Oracle 11g as JON database
|
||||||
Last Closed: | 2013-09-03 15:10:20 UTC | Type: | --- | ||||||
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: | |||||||||
Bug Blocks: | 782579, 785899, 786252, 786297, 806590 | ||||||||
Attachments: |
|
Description
Larry O'Leary
2012-01-26 23:20:29 UTC
Created attachment 557764 [details]
Proposed patch
Proposed patch which adds ignoreError="true" to all schema updates which deal with INDEX manipulation. This is done for all INDEX operations because we can not guarantee an index name and just because the index is not there or named something different shouldn't mean a complete failure.
Info on auto-indexes: http://docs.oracle.com/cd/B28359_01/server.111/b28310/indexes003.htm per https://bugzilla.redhat.com/show_bug.cgi?id=785802 ... setting priority to HIGH and targetting for JON 3.01 Additional forum discussion regarding auto generated indexes when dealing with keys: https://forums.oracle.com/forums/thread.jspa?threadID=2175562 I see no reason not to apply the suggested patch from Larry... master: commit 3ae6a9600f01eb0fad0f52b61277d9cbb31e5479 Applying suggested fix from loleary. Could not apply patch successfully so manually reapplied the fix, which is to protect create/drop index stmts with ignoreErrors="true". release/jon3.0.x: cherry pick commit db02533c122d00f11bcfdda3531db5567558a144 Moving to ON_QA as there is a new binary 3.0.1.GA RC2 available here to test with: https://brewweb.devel.redhat.com//buildinfo?buildID=197202 Installed JON 2.4.1 using an Oracle 11g database and Using http://localhost:7080/admin/test/sql.jsp , followed the steps as below: ALTER TABLE RHQ_OPERATION_SCHEDULE DROP CONSTRAINT RHQ_OPERATION_SCHEDULE_KEY; CREATE UNIQUE INDEX test_01_IDX ON RHQ_OPERATION_SCHEDULE (JOB_NAME,JOB_GROUP); ALTER TABLE RHQ_OPERATION_SCHEDULE ADD CONSTRAINT RHQ_OPERATION_SCHEDULE_KEY PRIMARY KEY (JOB_NAME, JOB_GROUP); Performed upgrade from JON 2.4.1 to JON 3.0.1.GA RC5 build (Build Number: dd8a001:fbca611). The 'rhq-installer-dbupgrade.log' file displays below error but it proceeds further for upgrade and the upgrade went successful. [schemaSpec] Error executing the task [org.rhq.core.db.ant.dbupgrade.SST_DirectSQL] in schema spec version [2.102]. Cause: The schema spec task [DirectSQL] has encountered an error. Cause: java.sql.SQLException: ORA-01408: such column list already indexed [upgrade] [dbupgrade] Finished upgrade: [2.101] -> [2.102] OK [upgrade] [dbupgrade] Upgrading: [2.102] -> [2.103] -- Please refer the attached rhq-installer-dbupgrade.log. Created attachment 566279 [details]
rhq-installer-dbupgrade.log
Bulk closing of old issues in VERIFIED state. |