Red Hat Bugzilla – Bug 1262348
when migrating (no upgrade involved) spacewalk-dump-schema creates wrong dump when rhn-upgrade is installed
Last modified: 2015-11-23 04:02:24 EST
Description of problem:
When migrating (no upgrade involved) spacewalk-dump-schema creates wrong dump when rhn-upgrade is installed. It is because it appends some SQL scripts from rhn-upgrade package which conflicts with schema itself.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Follow guide linked from bug 1261847
Dump fails when you are restoring it.
# spacewalk-sql -i < /tmp/migrate-to-postgresql-with-rhn-upgrade-installed.sql
ERROR: more than one row returned by a subquery used as an expression
spacewalk-dump-schema should ensure user do not created invalid dump
Doc bug 1261847 was reported as well
Went through whole upgrade cycle:
1. installed Satellite 5.6 with the Oracle DB backend
2. installed rhn-upgrade packege
3. did an upgrade to Satellite 5.7
4. did a DB dump for migration without removing rhn-upgrade package using "spacewalk-dump-schema --to=postgresql > migrate-to-postgresql.sql" command. Dump was created without any problems.
5. updated to spacewalk-utils-2.3.2-23.el6sat
6. again did a DB dump using same command as in step 4. Dump wasn't performed this time, and ended with an error message "Package rhn-upgrade detected, which may lead to errors during dump process. Please remove rhn-upgrade package and proceed with dump."
7. removed rhn-upgrade package
8. did a dump again, this time succesfuly.
9. attempted to import dump created in step 4 into different Satellite 5.7 DB. Failed with error message "more than one row returned by a subquery used as an expression", as expected.
10. imported the dump created in step 8 into different Satellite 5.7 DB. The import was successful.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.