Bug 812453

Summary: Migrating from EL5 to EL6 gives schema upgrade needed message
Product: [Community] Spacewalk Reporter: Adam <ajodock>
Component: ServerAssignee: Jan Pazdziora <jpazdziora>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: 1.7CC: cperry, dyordano, jpazdziora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-schema-1.8.16-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 823782 (view as bug list) Environment:
Last Closed: 2012-11-01 16:18:40 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:
Bug Depends On:    
Bug Blocks: 871344    

Description Adam 2012-04-13 18:52:18 UTC
Description of problem:
We recently migrated (rebuilt) the OS from 5.8 to 6.2, and when connecting the new install to the database the login page gives the warning:
"A schema upgrade is required. Please upgrade your schema at your earliest convenience to receive latest bugfixes and avoid potential problems."

The previous OS had spacewalk fully up to date so during the migration there was no need to upgrade the schema for spacewalk.

However when I run spacewalk-schema-upgrade this is the output:
"Schema upgrade: [spacewalk-schema-1.7.55-1.el5] -> [spacewalk-schema-1.7.55-1.el6]
Your database schema already matches the schema package version [spacewalk-schema-1.7.55-1]."

Version-Release number of selected component (if applicable):
OS with all updates + Spacewalk 1.7

Steps to Reproduce:
1. Install on EL5 based release
2. Migrate to EL6 based release
3. Browse to login page
  
Actual results:
Error message is displayed, and schema upgrade says already up to date.

Expected results:
No error message, or schema upgrade changes schema version from el5 to el6

Additional info:
I suspect that this problem might fix itself once there is another update to spacewalk that changes the schema.

We have been running like this for a little while now and I haven't found any issues that could be related to DB schema issues, so I assume the el5/el6 label shouldn't actually have any affect on the system.

Comment 1 Jan Pazdziora 2012-04-16 12:03:40 UTC
Please apply the following patch from

http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=4835b74a230bb49641b0e46e723c64f415ce2a2d

to /usr/bin/spacewalk-schema-upgrade and then rerun the spacewalk-schema-upgrade command while Spacewalk services are stopped.

That will bring the schema version as recorded in the database in sync with the installed rpms and the warning message will go away.

Comment 2 Jan Pazdziora 2012-04-16 12:04:42 UTC
Fixed in Spacewalk master, 4835b74a230bb49641b0e46e723c64f415ce2a2d.

Comment 4 Adam 2012-04-16 13:45:18 UTC
Thanks!  That did the trick.

Comment 7 Jan Pazdziora 2012-10-30 19:23:27 UTC
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/

Comment 8 Jan Pazdziora 2012-11-01 16:18:40 UTC
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18