Bug 1175398 - spacewalk-dump-schema does not fully support external PostgreSQL
Summary: spacewalk-dump-schema does not fully support external PostgreSQL
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades
Version: 570
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Jan Dobes
QA Contact: Pavel Studeník
URL:
Whiteboard:
Depends On:
Blocks: sat570-upgrades 1175189
TreeView+ depends on / blocked
 
Reported: 2014-12-17 16:06 UTC by Jan Dobes
Modified: 2015-01-13 10:18 UTC (History)
3 users (show)

Fixed In Version: spacewalk-utils-2.3.2-12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-13 10:18:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Dobes 2014-12-17 16:06:50 UTC
Description of problem:
spacewalk-dump-schema does not support intuitive way to specify external/managed PostgreSQL hostname and port.

Version-Release number of selected component (if applicable):
spacewalk-utils-2.3.2-10.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. Have PostgreSQL database on different machine or port
2. Try to run spacewalk-dump-schema on it

Actual results:
You can connect only with knowledge of Perl code and PostgreSQL library:

spacewalk-dump-schema --from=postgresql --db="spacesatschema;host=guest;port=5432" --user=spacesatuser --password=spacesatpw

You have to stack it into --db parameter.

Expected results:
Have additional parameters to specify host and port.

Comment 1 Jan Dobes 2014-12-17 18:17:38 UTC
fixed in spacewalk master:

a1e39941d4588db30f1d9e86ab3760d4bb175851

Comment 5 Martin Korbel 2015-01-09 12:51:40 UTC
RE-VERIFIED on Satellite-5.7.0-RHEL6-re20150105.1 (spacewalk-utils-2.3.2-13.el6sat).

> spacewalk-dump-schema --help
Usage:

/usr/bin/spacewalk-dump-schema [--from=oracle] [--to=DB_BACKEND] [--db=SID --user=USERNAME --password=PASSWORD]

/usr/bin/spacewalk-dump-schema [--from=postgresql] [--to=DB_BACKEND] [--db=DBNAME --host=HOSTNAME --port=PORT --user=USERNAME --password=PASSWORD]

/usr/bin/spacewalk-dump-schema [ --help ]



> man spacewalk-dump-schema
<MAN>
...
spacewalk-dump-schema [--from=postgresql] [--to=DB_BACKEND]
     [--db=DBNAME --host=HOSTNAME --port=PORT --user=USERNAME --pass
word=PASSWORD]

...

spacewalk-dump-schema --to=oracle --db=spaceschema \
                      --host=localhost --port=5433 \
                      --user=spaceuser --password=o9k2HInsl \
   | NLS_LANG=AMERICAN_AMERICA.UTF8 sqlplus spaceuser/spacepw@//localhost/XE

</MAN>

> spacewalk-dump-schema --from=postgresql --to=oracle  --db=spaceschema --host=ext-pg.redhat.com --port=5432 --user=spaceuser --password=xxx > /tmp/schema-oracle.dump
> ls -lh /tmp/schema-oracle.dump
-rw-r--r--. 1 root root 742M Jan  9 13:50 /tmp/schema-oracle.dump

Comment 6 Clifford Perry 2015-01-13 10:18:41 UTC
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is
being moved to a Closed Current Release state. 

The Satellite 5.7 GA Errata:
 - https://rhn.redhat.com/errata/RHSA-2015-0033.html 

Satellite 5.7 Release Notes:
 -
https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html

Satellite Customer Portal Blog announcement for release:
 - https://access.redhat.com/blogs/1169563/posts/1315743 

Cliff


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