[Spacewalk-list] Upgrade 2.7 -> 2.8: schema upgrade fails

Guy Matz guymatz at gmail.com
Fri May 25 14:47:20 UTC 2018


Oh, Tomáš!  You're the bestest!!

On Fri, May 25, 2018 at 7:02 AM, Tomáš Kašpárek <tkaspare at redhat.com> wrote:

> If you have properly configured repositories on your Spacewalk machine and
> Spacewalk 2.8 repo enabled, just run "yum update spacewalk-schema".
>
> In the package there's a fix I did so you just need to restore the
> database like you did previously and re-run the upgrade.
>
> Tomáš
>
>
> On 05/23/2018 05:02 PM, Guy Matz wrote:
>
> Great!  Does that resolve my issue?  Or will Tomáš's work resolve it?
>
> Where can I retrieve spacewalk-schema-2.8.25-1?
>
> Thank you!
>
> On Wed, May 23, 2018 at 7:32 AM, Jiří Dostál <jdostal at redhat.com> wrote:
>
>> Hi,
>>
>> fix provided in mentioned BZ is now available in
>> spacewalk-schema-2.8.25-1.
>>
>> Regards,
>> Jiri
>>
>> Dne 23.5.2018 v 10:03 Tomáš Kašpárek napsal(a):
>>
>> I am actually working for universal fix as the fix in the
>> https://bugzilla.redhat.com/show_bug.cgi?id=1576002 was targeting one
>> specific database and data there.
>>
>> Hopefully I'll finish with this this week.
>>
>> Tomas
>>
>> On 05/22/2018 11:23 PM, Guy Matz wrote:
>>
>> Darn.  Still failing with what looks to be the same error:
>> bash-4.2$ cat /var/log/spacewalk/schema-upgr
>> ade/20180522-130306-to-spacewalk-schema-2.8.log
>> UPDATE 1
>> COMMIT
>>                                            ?column?
>> ------------------------------------------------------------
>> -----------------------------------
>>  spacewalk-schema-2.7-to-spacewalk-schema-2.8/001-rhnpackage
>> evr-rhn_pe_v_r_e_uq.sql.postgresql
>> (1 row)
>>
>> CREATE FUNCTION
>> DROP TRIGGER
>> psql:/var/log/spacewalk/schema-upgrade/20180522-130306-script.sql:57:
>> ERROR:  null value in column "nevra_id" violates not-null constraint
>> DETAIL:  Failing row contains (4966, null).
>> CONTEXT:  SQL statement "update rhnsnapshotpackage set nevra_id =
>> nevra_orig.id where nevra_id = nevra_dup.id"
>> PL/pgSQL function fix_rhn_pe_v_r_e_uq() line 28 at SQL statement
>>
>> Any other ideas?
>>
>>
>>
>> Thank you!!
>>
>> On Tue, May 22, 2018 at 2:52 AM, Tomáš Kašpárek <tkaspare at redhat.com>
>> wrote:
>>
>>> Hello,
>>>
>>> have you restored the database from backup after you've applied patch
>>> from https://bugzilla.redhat.com/show_bug.cgi?id=1576002?
>>> It seems like you've applied patch after the schema upgrade failed and
>>> you're trying to restore the schema-upgrade process. Unfortunately, this is
>>> not how it works with schema upgrade and you need to go back to prior
>>> version of schema from backup and restart the schema-upgrade process
>>> completely.
>>>
>>> Tomas
>>>
>>>
>>> On 05/21/2018 10:37 PM, Guy Matz wrote:
>>>
>>> Hello!  When trying to upgrade from 2.7 to 2.8, I got this error during
>>> /usr/bin/spacewalk-schema-upgrade:
>>>
>>> null value in column "nevra_id" violates not-null constraint
>>>
>>> I tried making the changes in the schema upgrade patch here:
>>> https://bugzilla.redhat.com/show_bug.cgi?id=1576002
>>>
>>> But now I get:
>>> # /usr/bin/spacewalk-schema-upgrade
>>> Unknown schema name [(0 rows)] found.
>>>
>>> Any thoughts would be greatly appreciated.
>>>
>>> Thanks,
>>> Guy
>>>
>>>
>>> _______________________________________________
>>> Spacewalk-list mailing listSpacewalk-list at redhat.comhttps://www.redhat.com/mailman/listinfo/spacewalk-list
>>>
>>>
>>>
>>
>>
>>
>> _______________________________________________
>> Spacewalk-list mailing listSpacewalk-list at redhat.comhttps://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>>
>> --
>> Jiří Dostál | Associate Software Engineer
>> Red Hat Satellite
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20180525/faef8481/attachment.htm>


More information about the Spacewalk-list mailing list