Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 470791 - Upgrading issues from 02 to 03
Summary: Upgrading issues from 02 to 03
Alias: None
Product: Spacewalk
Classification: Community
Component: Installation
Version: 0.3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Red Hat Satellite QA List
: 470887 (view as bug list)
Depends On:
Blocks: space03 space04
TreeView+ depends on / blocked
Reported: 2008-11-10 10:29 UTC by Jan Pazdziora
Modified: 2009-01-22 16:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-01-22 16:30:23 UTC

Attachments (Terms of Use)

Description Jan Pazdziora 2008-11-10 10:29:26 UTC
Description of problem:

From spacewalk-list:

I have check what are the rpm package version are installed vs what are
available on the new repository for 0.3 and found that I was not up to date.

I have done:

Yum upgrade

Then, when I run:

[root@spacew up2date]#  /usr/bin/spacewalk-schema-upgrade
Schema upgrade: [spacewalk-schema-0.2.5-1.el5.sw] -> [spacewalk-schema-0.3.6-1.el5.sw]
Searching for upgrade path: [spacewalk-schema-0.2.5-1] -> [spacewalk-schema-0.3.6-1]
Searching for upgrade path: [spacewalk-schema-0.2.5] -> [spacewalk-schema-0.3.6]
Searching for upgrade path: [spacewalk-schema-0.2] -> [spacewalk-schema-0.3]
The path: [spacewalk-schema-0.2] -> [spacewalk-schema-0.3]
Planing to run sqlplus with [/var/log/spacewalk/schema-upgrade/20081107-150935-script.sql]
Hit Enter to continue or Ctrl+C to interrupt:
Executing sqlplus, the logs are in
Upgrade failed, please see log in [/var/log/spacewalk/schema-upgrade/].

Here is the content of

SQL>    whenever sqlerror exit sql.sqlcode
SQL>    update rhnVersionInfo
  2     set label = 'schema-from', modified = sysdate
  3     where label = 'schema';
        update rhnVersionInfo
ERROR at line 1:
ORA-00001: unique constraint (SPACEWALK.RHN_VERSIONINFO_LABEL_UQ) violated



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

Upgrade from 0.1 to 0.2 and then from 0.2 to 0.3.

How reproducible:

Seems deterministic.

Steps to Reproduce:
1. Install Spacewalk 0.1.
2. Upgrade to 0.2.
3. Try to upgrade to 0.3.
Actual results:

Error above.

Expected results:

No error.

Additional info:

Comment 1 Jan Pazdziora 2008-11-10 10:31:58 UTC
Cliff P. further said:

Just to follow up quickly - issue was because of previous upgrade from 0.1
-> 0.2 - we attempt to create a duplicate entry. Gave a short term work
around solution on IRC. We need to address/fix code for the
/usr/bin/spacewalk-schema-upgrade command to not attempt to create
duplicate 'schema-from' entries in the DB, but maybe delete the old
upgrade entry or sequentially bump them up.


Comment 2 Jan Pazdziora 2008-11-10 10:33:26 UTC
My original idea about the code was to have the full history of schema upgrades there. So I'd rather not delete them.

I'm proposing to name the label schema-from-YYYYMMDD-HH24MISS, which should be unique-ish enough.

Comment 3 Jan Pazdziora 2008-11-10 19:14:45 UTC
*** Bug 470887 has been marked as a duplicate of this bug. ***

Comment 4 Jan Pazdziora 2008-11-11 13:47:51 UTC
Fix committed to RELEASE-0.3 in commit 714d65c51bfba73f8da6ff406694dc171e00e4ee
and to master in commit e88eb34029f434c08e6775c14ab79b668bbd5336.

Comment 5 Jan Pazdziora 2008-11-11 13:55:19 UTC
Packages spacewalk-schema-0.3.7-1.el4.sw and spacewalk-schema-0.3.7-1.el5.sw were built.

Comment 6 Jan Pazdziora 2008-11-11 13:57:45 UTC
For the record, the mailing list thread can be found at

Comment 7 Miroslav Suchý 2009-01-15 14:10:29 UTC
No error in log after upgrade from 0.1 -> 0.2 -> 0.4

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