Bug 470791 - Upgrading issues from 02 to 03
Upgrading issues from 02 to 03
Product: Spacewalk
Classification: Community
Component: Installation (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Red Hat Satellite QA List
: 470887 (view as bug list)
Depends On:
Blocks: space03 space04
  Show dependency treegraph
Reported: 2008-11-10 05:29 EST by Jan Pazdziora
Modified: 2009-01-22 11:30 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-22 11:30:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Pazdziora 2008-11-10 05:29:26 EST
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 05:31:58 EST
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 05:33:26 EST
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 14:14:45 EST
*** Bug 470887 has been marked as a duplicate of this bug. ***
Comment 4 Jan Pazdziora 2008-11-11 08:47:51 EST
Fix committed to RELEASE-0.3 in commit 714d65c51bfba73f8da6ff406694dc171e00e4ee
and to master in commit e88eb34029f434c08e6775c14ab79b668bbd5336.
Comment 5 Jan Pazdziora 2008-11-11 08:55:19 EST
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 08:57:45 EST
For the record, the mailing list thread can be found at https://www.redhat.com/archives/spacewalk-list/2008-November/msg00048.html
Comment 7 Miroslav Suchý 2009-01-15 09:10:29 EST
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.