Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 974217

Summary: 5.4.1 to 5.5 "CREATE UNIQUE INDEX rhn_ram_sid_uq" schema upgrade failure on RHEL 5.9
Product: Red Hat Satellite 5 Reporter: Wesley Duffee-Braun <wduffee>
Component: UpgradesAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED DUPLICATE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: high    
Version: 541   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-13 17:35:32 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:

Description Wesley Duffee-Braun 2013-06-13 17:26:38 UTC
Description of problem:
Trying to upgrade from 5.4.1 to 5.5 (disconnected) on RHEL 5.9 x86_64 (fully updated) and the schema upgrade fails with the following error:

DROP INDEX rhn_ram_sid_idx
Error at line 1: 
ORA-01418: specified index does not exist

Version-Release number of selected component (if applicable):
Satellite 5.4.1

Actual results:
Upgrade fails

Expected results:
Upgrade continues

Additional info:
Patch from 
https://git.fedorahosted.org/cgit/spacewalk.git/commit/?id=99317e6fdf60d950277842e7818fb46f9a8e0ca0

-CREATE UNIQUE INDEX rhn_ram_sid_uq
-    ON rhnRam (server_id)
-    TABLESPACE [[4m_tbs]]
-    NOLOGGING;
+declare
+	name_already_used exception;
+	pragma exception_init(name_already_used, -00955);
+begin
+	execute immediate 'create unique index rhn_ram_sid_uq on rhnRam(server_id) tablespace [[4m_tbs]] nologging';
+	dbms_output.put_line('Index rhn_ram_sid_uq successfully created.');
+exception
+	when name_already_used then
+		dbms_output.put_line('Index rhn_ram_sid_uq already exists.');
+end;
+/

Seems to be satisfactory to solving problem.

Comment 2 Milan Zázrivec 2013-06-13 17:35:32 UTC

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