Description of problem: Upgrade of schema fails when upgrading to spacewalk nightly Steps to Reproduce: 1. have installed Spacewalk 2.4 2. enable spacewalk nightly repo 3. update spacewalk-schema package 4. execute command spacewalk-schema-upgrade Actual results: # spacewalk-schema-upgrade Schema upgrade: [spacewalk-schema-2.4.24-1.el7] -> [spacewalk-schema-2.5.19-1.el7] Searching for upgrade path: [spacewalk-schema-2.4.24-1] -> [spacewalk-schema-2.5.19-1] Searching for upgrade path: [spacewalk-schema-2.4.24] -> [spacewalk-schema-2.5.19] Searching for upgrade path: [spacewalk-schema-2.4] -> [spacewalk-schema-2.5] The path: [spacewalk-schema-2.4] -> [spacewalk-schema-2.5] Planning to run spacewalk-sql with [/var/log/spacewalk/schema-upgrade/20160322-061140-script.sql] Plase make sure you have a valid backup of your database before continuing. Hit Enter to continue or Ctrl+C to interrupt: Executing spacewalk-sql, the log is in [/var/log/spacewalk/schema-upgrade/20160322-061140-to-spacewalk-schema-2.5.log]. Upgrade failed, please see log [/var/log/spacewalk/schema-upgrade/20160322-061140-to-spacewalk-schema-2.5.log]. Additional info: Part of log file containing error: ?column? -------------------------------------------------------------------------------------------- spacewalk-schema-2.4-to-spacewalk-schema-2.5/167-remove_virt_sub_level_refs.sql.postgresql (1 řádka) DELETE 1 DELETE 1 psql:/var/log/spacewalk/schema-upgrade/20160322-061140-script.sql:9331: ERROR: update or delete on table "rhnvirtsublevel" violates foreign key constraint "rhn_cfvsl_vslid_fk" on table "rhnchannelfamilyvirtsublevel" DETAIL: Key (id)=(1) is still referenced from table "rhnchannelfamilyvirtsublevel". RHEL 7 channel synced.
Fixed: Added script to delete corresponding data in referenced table (rhnchannelfamilyvirtsublevel) at first. Spacewalk-git-commit: 130e11fe3ae9173877853a6f296d1529de6217fa
Spacewalk 2.5 was released.
This BZ closed some time during 2.5, 2.6 or 2.7. Adding to 2.7 tracking bug.