Bug 486254

Summary: Broken SQL Causing Installation Failures
Product: [Community] Spacewalk Reporter: Devan Goodwin <dgoodwin>
Component: InstallationAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: high    
Version: 0.5CC: msuchy
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-27 14:10:39 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: 456553    

Description Devan Goodwin 2009-02-19 02:52:17 UTC
Description of problem:

During spacewalk-setup 

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

spacewalk-schema-0.5.9-1, 0.5.8 appears broken as well. Problem does not occurr in 0.5.7.

How reproducible:

100%

Steps to Reproduce:
1. Install from devel repo.
2. spacewalk-setup --disconnected
  
Actual results:

** Database: Populating database.
*** Progress: ###################################
Could not populate database.



Additional info:

Problem surfaces in populate_db.log:

SQL_FILE
-----------------------------------
rhnsat/tables/rhnRepoRegenQueue.sql

Table created.

Sequence created.

Warning: Trigger created with compilation errors.

Errors for TRIGGER RHN_REPO_REGEN_QUEUE_MOD_TRIG:

LINE/COL ERROR
-------- -----------------------------------------------------------------
5/1      PLS-00103: Encountered the symbol "SELECT"

SQL_FILE
--------------------------------------
rhnsat/tables/rhnVirtSubLevel_data.sql

SQL_FILE
--------------------------------------
rhnsat/tables/rhnVirtSubLevel_data.sql


1 row created.


1 row created.


Commit complete.


SQL_FILE
--------------------------------------------
rhnsat/tables/rhnSGTypeVirtSubLevel_data.sql

insert into rhnSGTypeVirtSubLevel
            *
ERROR at line 1:
ORA-00942: table or view does not exist


Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

Comment 2 Pradeep Kilambi 2009-02-19 04:09:15 UTC
weird, rhnSGTypeVirtSubLevel is not a new table. We had this since 5.0+ sats I suspect something did not get picked up when building the schema package.

Comment 3 Pradeep Kilambi 2009-02-19 04:38:06 UTC
ran the new rhnreporegenqueue through sqlplus and seems to create the trigger fine. 

[root@rlx-2-22 ~]# sqlplus rhnsat/rhnsat@rhnsat @rhnRepoRegenQueue.sql 

SQL*Plus: Release 10.2.0.4.0 - Production on Wed Feb 18 23:30:50 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


Table created.


Sequence created.


Trigger created.

SQL>

Comment 4 Devan Goodwin 2009-02-19 15:23:02 UTC
Problem was missing \ and show errors at end of the new tables, which in turn affected the virt tables.

Fixed in spacewalk git: 84c538ea6267017f1a1d839f79e02a6eb8e54023

Comment 5 Devan Goodwin 2009-02-19 15:25:24 UTC
And another fix in b715621aa747ffec1b15327b58de2b03c7aacc7c for slash going the wrong way. :)