[Spacewalk-list] error on schema upgrade after upgrading to 1.8

Jan Pazdziora jpazdziora at redhat.com
Wed Dec 5 08:24:56 UTC 2012


On Tue, Dec 04, 2012 at 09:14:31PM -0500, Maria Iano wrote:
> I have a 32-bit RHEL 5.8 server which was running spacewalk 1.7.
> Today I upgraded it to 1.8 and that seemed to work without any
> problems. However, when I ran spacewalk-schema-upgrade it died with
> this error at the end of the log file:
> 
>                                  ?column?
> --------------------------------------------------------------------------
>  spacewalk-schema-1.7-to-spacewalk-schema-1.8/143-novell-package-keys.sql
> (1 row)
> 
> psql:/var/log/spacewalk/schema-upgrade/20121204-162859-script.sql:
> 2356: ERROR:  duplicate key value violates unique constraint
> "rhn_pkg_provider_name_uq"
> 
> I took a look at line 2356 in /var/log/spacewalk/schema-upgrade/20121204-162859-script.sql
> and here it is with the previous line:
> 
> insert into rhnPackageProvider (id, name) values
> (sequence_nextval('rhn_package_provider_id_seq'), 'Novell Inc.' );
> 
> Out of curiosity I tried restoring the database and running that
> query on its own and it ran with no error. I tried the upgrade after
> running that, and also after restoring again but it died both times
> with the same error.

Did it really die on the exact same line?

> Has anyone else come across this?

Can you check that

	/var/log/spacewalk/schema-upgrade/20121204-162859-script.sql

script to see if the line 2356 is indeed the first line in the script
which mentions "Novell Inc."? Clearly, when you restore and run that
command, it passes, so the record with name "Novell Inc." is not in
your rhnPackageProvider table. Then on line 2356 it is there.
I suspect there is something earlier in the script which inserts it
there.

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list