Hi, and thanks to all. The new scripts works. Greets Torsten
-----Original Message----- From: Michael Calmer [mailto:mc@suse.de] Sent: Saturday, March 28, 2020 2:37 PM To: uyuni-users@opensuse.org Subject: [EXTERN] Re: [uyuni-users] Update Uyuni 4.0.2 to current version
Hi
Am Freitag, 27. März 2020, 14:34:32 CET schrieb Haupt, Torsten:
Hi,
I tried to update my Uyuni installation from 4.0.2 to 2020.03 (the current version). I did " spacewalk-service stop", changed the repo and made a zypper update. After that I startet the postgresql database and tried the schema upgrade. But the upgrade didn't finished succesfully:
[...]
The last element in [/var/log/spacewalk/schema-upgrade/schema-from-20200327-142721-to- suse manag er-schema-4.1.5.log shows: ?column? ---------------------------------------------------------------------- ------ -------------------- susemanager-schema-4.1.3-to-susemanager-schema-4.1.4/004-drop-mgr- regi ster- task.sql.postgresql (1 row)
psql:<stdin>:4: ERROR: update or delete on table "rhntaskotemplate" violates foreign key constraint "rhn_tasko_run_template_fk" on table "rhntaskorun" DETAIL: Key (id)=(18) is still referenced from table "rhntaskorun". ================== started: 2020-03-27 13:40:57 ================== SQL> select 'susemanager-schema-4.1.3-to-susemanager-schema-4.1.4/004-drop-mgr- reg ister -task.sql.postgresql' from dual; DELETE FROM rhnTaskoTemplate WHERE bunch_id = (SELECT id FROM rhnTaskoBunch WHERE name='mgr-register-bunch') AND task_id = (SELECT id FROM rhnTaskoTask WHERE name='mgr-register'); DELETE FROM rhnTaskoTask WHERE name = 'mgr-register'; DELETE FROM rhnTaskoSchedule WHERE job_label = 'mgr-register-default'; DELETE FROM rhnTaskoBunch WHERE name = 'mgr- register-bunch'; commit;
Hmm, seems we forgot to cleanup a table. Thanks for reporting.
I made a PR which should fix it for others in future:
https://github.com/uyuni-project/uyuni/pull/2071
If your server is still at this point, you can download the new version of that file (Files -> View File -> RAW) and copy it on your server at
/etc/sysconfig/rhn/schema-upgrade/susemanager-schema-4.1.3-to- susemanager- schema-4.1.4/004-drop-mgr-register-task.sql.postgresql
After this call "spacewalk-schema-upgrade" again and it should continue with the upgrade.
-- Regards
Michael Calmer
-------------------------------------------------------------------------- Michael Calmer SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, D-90409 Nuernberg T: +49 (0) 911 74053 0 F: +49 (0) 911 74053575 - e-mail: Michael.Calmer@suse.com -------------------------------------------------------------------------- SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer (HRB 36809, AG Nürnberg)
-- To unsubscribe, e-mail: uyuni-users+unsubscribe@opensuse.org To contact the owner, e-mail: uyuni-users+owner@opensuse.org
-- To unsubscribe, e-mail: uyuni-users+unsubscribe@opensuse.org To contact the owner, e-mail: uyuni-users+owner@opensuse.org