[Spacewalk-list] Error Upgrading from 1.6 -> 1.7

Wojtak, Greg (Superfly) GregWojtak at quickenloans.com
Mon Oct 15 20:16:46 UTC 2012


On 2012-10-12 1:00 PM, "Jan Pazdziora" <jpazdziora at redhat.com> wrote:

>On Fri, Oct 12, 2012 at 04:50:53PM +0000, Wojtak, Greg (Superfly) wrote:
>> I got an error doing an upgrade from 1.6 to 1.7 today.  The error
>>occurred doing the schema update.  From the log, I get:
>> 
>>                                  ?column?
>> 
>>-------------------------------------------------------------------------
>>--
>>  
>>spacewalk-schema-1.6-to-spacewalk-schema-1.7/007-rhnPackageGroup-trim.sql
>> (1 row)
>> 
>> UPDATE 41615
>> psql:/var/log/spacewalk/schema-upgrade/20121012-123027-script.sql:445:
>>ERROR:  update or delete on table "rhnpackagegroup" violates foreign key
>>constraint "rhn_pkgsrc_group_fk" on table "rhnpackagesource"
>> DETAIL:  Key (id)=(22) is still referenced from table
>>"rhnpackagesource".
>> 
>> Any help is greatly appreciated!
>
>Please restore the database from backup, replace the
>007-rhnPackageGroup-trim.sql file with the current version from
>
>	http://git.fedorahosted.org/cgit/spacewalk.git/tree/schema/spacewalk/upgr
>ade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/007-rhnPackageGroup-trim.
>sql
>
>and rerun the spacewalk-schema-upgrade.
>
>-- 
>Jan Pazdziora
>Principal Software Engineer, Satellite Engineering, Red Hat
>
>_______________________________________________
>Spacewalk-list mailing list
>Spacewalk-list at redhat.com
>https://www.redhat.com/mailman/listinfo/spacewalk-list


This fixed part of the issue, but one of the other updates fails.  It's
the first update after the delete, and the issue is that it is trying to
strip newlines off of the rhnpackagegroup.name column.  In my database, I
have several instances of, say "System/Libraries" and "System/Libraries\n"
so the unique naming constraint is being violated and the update fails (as
it should).  I only have five different groups, so I can go through and
fix them in the rhnpackages and rhnpackagesource tables, but thought I'd
let you know.


Greg Wojtak
Sr. Unix Systems Engineer
Office: (313) 373-4306
Cell: (734) 718-8472







More information about the Spacewalk-list mailing list