Bug 1261847 - when migrating from Oracle to PostgreSQL or vice versa package rhn-upgrade should not be installed
Summary: when migrating from Oracle to PostgreSQL or vice versa package rhn-upgrade sh...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Docs Installation Guide
Version: 570
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Dan Macpherson
QA Contact: Dan Macpherson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-10 10:04 UTC by Jan Hutař
Modified: 2015-10-21 03:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-21 03:31:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2015-09-10 10:04:55 UTC
Description of problem:
 When customer would follow this guide:

  https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html/Installation_Guide/sect-Migrating_from_an_External_Oracle_Database_to_an_Embedded_Database.html

in step "spacewalk-dump-schema --to=postgresql >
migrate-to-postgresql.sql" the utility would
add /etc/sysconfig/rhn/schema-dump/sql/* to the end of the dump,
but because dump is already in 5.7.0 version, this would fail
(e.g. because we want to insert some taskomatic bunch which is
already present).


Version-Release number of selected component (if applicable):
current


Expected results:
There should be instruction (somewhere before step with spacewalk-dump-schema) to make sure you do not have rhn-upgrade package installed.

I believe this is applicable to all scenarios:

  12.8.1. Migrating from an Embedded Database to a Managed Database
  12.8.2. Migrating from an Embedded Database to an External PostgreSQL Database
  12.8.3. Migrating from an Embedded Database to an External Oracle Database
  12.8.4. Migrating from a Managed Database to an Embedded Database
  12.8.5. Migrating from an External PostgreSQL Database to an Embedded Database
  12.8.6. Migrating from an External Oracle Database to an Embedded Database

Comment 1 Jan Hutař 2015-09-10 10:07:23 UTC
I have checked external Oracle to embedded PostgreSQL and indeed when importing dump created with rhn-upgrade package installed, you get:

# 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

Importing dump which was created without rhn-upgrade package installed it works.

Comment 2 Jan Hutař 2015-09-10 10:12:30 UTC
Jan, could you please confirm if my request above is valid? Also please check that "this is applicable to all scenarios" section.

Comment 3 Jan Dobes 2015-09-10 15:41:04 UTC
Yes, rhn-upgrade package should not be needed if we are migrating between same schema versions. Only affected scenario seems to be Oracle -> PostgreSQL but rhn-upgrade should not be needed for any migrations. The other option would be to fix this problem in spacewalk-dump-schema code.


Note You need to log in before you can comment on or make changes to this bug.