Bug 487319 - Pre-Goldmember sql upgrade scripts lack several updates
Summary: Pre-Goldmember sql upgrade scripts lack several updates
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Jeff Browning
URL:
Whiteboard:
Depends On:
Blocks: 456986
TreeView+ depends on / blocked
 
Reported: 2009-02-25 13:59 UTC by Milan Zázrivec
Modified: 2009-08-27 17:33 UTC (History)
1 user (show)

Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-27 17:33:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
2.5-89 to 5.3.0 schema upgrade differences (2.67 KB, text/plain)
2009-02-26 16:18 UTC, Milan Zázrivec
no flags Details
sql script for comparison (638 bytes, text/plain)
2009-04-20 15:26 UTC, Milan Zázrivec
no flags Details

Description Milan Zázrivec 2009-02-25 13:59:38 UTC
Description of problem:
When diffing schema of a new 5.3.0 installation and a 3.7.1 -> 5.3.0 upgrade,
several differences are showing (all coming from pre 5.2.0 times):

Constraints:
* upgraded schema lacks rhn_clientcapnam_name_unq (rhnClientCapabilityName)
* upgraded schema lacks rhn_kvt_label_unq (rhnKickstartVirtualizationType)
* upgraded schema doesn't put NOT NULL on rhnKickstartCommandName.sort_order
* upgraded schema doesn't put NOT NULL on rhnKickstartCommandName.uses_arguments

Data:
* rhn_command_parameter differs in two lines (columns sorted alphabetically):
 - 16 password public 1 SNMP Community String 80 30 1 40 password system 1
 community config
 + 16 password public 1 SNMP Community String 80 30 1 40 text system 1 
 community config
 - 113 password public 1 SNMP Community String 80 4 1 40 password system 1
 community config
 + 113 password public 1 SNMP Community String 80 4 1 40 text system 1
 community config
* rhn_db_environment differs in two lines (columns sorted alphabetically):
 - RHNSAT LICENSE
 + WEBDEV LICENSE
* rhnKickstartCommandName differs in one line (columns sorted alphabetically):
 + autostep N 1 N
 - autostep N 1 Y

Version-Release number of selected component (if applicable):
rhn-satellite-3.7.1-7 to Satellite-5.3.0-RHEL4-re20090220.1 upgrade

How reproducible:
Always

Steps to Reproduce:
1. Install rhn-satellite-3.7.1-7
2. Upgrade to some of the recent 5.3.0 builds
3. On another machine, install a new 5.3.0 satellite
4. Check that following queries return the same data on both installations:

> select * from user_constraints where constraint_name = 'RHN_CLIENTCAPNAM_NAME_UNQ';

> select * from user_constraints where constraint_name = 
RHN_KVT_LABEL_UNQ;

> desc rhnKickstartCommandName
^^ this needs to say NOT NULL for sort_order and uses_arguments columns

> select FIELD_WIDGET_NAME from rhn_command_parameter where command_id = 16 and DATA_TYPE_NAME = 'password';

> select FIELD_WIDGET_NAME from rhn_command_parameter where command_id = 113 and DATA_TYPE_NAME = 'password';

> select * from rhn_db_environment;

> select * from rhnKickstartCommandName where name = 'autostep';
  
Actual results:
Mentioned queries differ.

Expected results:
Mentioned queries return the same results.

Additional info:
All the differences mentioned above come from upgrades before 5.2.0. SQL
upgrades from 5.1.0 to 5.2.0 and beyond are good.

Comment 2 Milan Zázrivec 2009-02-26 16:18:46 UTC
Created attachment 333352 [details]
2.5-89 to 5.3.0 schema upgrade differences

Just for the record, I'm attaching differences between newly installed
5.3.0 and a schema upgraded from 2.5-89 (a.k.a. rhn-satellite-2.0-64)
to latest 5.3.0.

It shows couple of more differences, although these most likely won't be fixed.
Purpose of this comment and the attached log is purely informative.

Comment 3 Milan Zázrivec 2009-04-17 15:15:43 UTC
satellite.git SATELLITE-5.3: 4a8a1d9633acf15f57605f6f1042f104338959ab

Comment 4 Milan Zázrivec 2009-04-20 14:03:43 UTC
spacewalk.git master:
79e3d430f5ed8b0eddef81b9e22b357d3e9741da
fe100d328115f40bed13e0abc7755fcf9a8ffced

spacewalk.git VADER:
d07c05a3b736654f727db4435fec1c6472039599
fbe69154500eeabbcd4eb5db46587abfc17bf07c

Comment 5 Milan Zázrivec 2009-04-20 15:26:37 UTC
Created attachment 340366 [details]
sql script for comparison

Attachment contains sql script that should be used for verification
of this bug. It needs to be run with sqlplus and needs to return same
results on a new & upgraded Satellite.

Comment 6 Milan Zázrivec 2009-05-11 17:28:16 UTC
satellite-schema-5.3.0.18-1

Comment 7 Jeff Browning 2009-06-17 08:45:51 UTC
Blocked as of right now by a spacewalk-schema-upgrade bug. Will retest when I can.

Comment 8 Jeff Browning 2009-06-26 21:00:53 UTC
Upgraded 3.7 to 5.3

Using the script provided, the returned results match for both the upgrades 5.3 sat and the cleanly installed 5.3 sat.

Verified.


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