Bug 1165057 - db-control fails to do online-backup due to: pg_dump: server version: 9.2.8; pg_dump version: 8.4.20
Summary: db-control fails to do online-backup due to: pg_dump: server version: 9.2.8; ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client
Version: 570
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Pavel Studeník
URL:
Whiteboard:
Depends On:
Blocks: sat570-blockers
TreeView+ depends on / blocked
 
Reported: 2014-11-18 08:53 UTC by Jan Hutař
Modified: 2015-01-13 10:26 UTC (History)
2 users (show)

Fixed In Version: spacewalk-web-2.3.2-19-sat
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-13 10:26:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2014-11-18 08:53:12 UTC
Description of problem:
db-control fails to do online-backup due to server/tooling version mismatch.


Version-Release number of selected component (if applicable):
Satellite-5.7.0-RHEL6-re20141114.0-x86_64
# rpm -qa | grep -e dobby -e postgre | sort
postgresql-8.4.20-1.el6_5.x86_64
postgresql92-postgresql-9.2.8-2.el6.x86_64
postgresql92-postgresql-contrib-9.2.8-2.el6.x86_64
postgresql92-postgresql-libs-9.2.8-2.el6.x86_64
postgresql92-postgresql-pltcl-9.2.8-2.el6.x86_64
postgresql92-postgresql-server-9.2.8-2.el6.x86_64
postgresql92-runtime-1.1-21.el6.x86_64
postgresql-jdbc-8.4.704-2.el6.noarch
postgresql-libs-8.4.20-1.el6_5.x86_64
spacewalk-backend-sql-postgresql-2.3.3-18.el6sat.noarch
spacewalk-dobby-2.3.2-18.el6sat.noarch
spacewalk-java-postgresql-2.3.8-67.el6sat.noarch
spacewalk-postgresql-2.3.0-1.5.el6sat.noarch
spacewalk-setup-postgresql-2.3.0-8.el6sat.noarch


How reproducible:
always


Steps to Reproduce:
1. # db-control online-backup /tmp/online-backup


Actual results:
# db-control online-backup /tmp/online-backup
Backing up to file /tmp/online-backup.
pg_dump: server version: 9.2.8; pg_dump version: 8.4.20
pg_dump: aborting because of server version mismatch
pg_dump: *** aborted because of error
Backup complete.
# echo $?
0


Expected results:
1) it should work
2) when it fails this way, it should exit with non-0 exit code

Comment 1 Stephen Herr 2014-11-18 20:57:18 UTC
/usr/bin/pg_dump is provided by postgresql-8.4.20-1.el6_5.x86_64, which explains why it is the 8.4 version. postgresql92-postgresql-9.2.8-2.el6.x86_64 installs its own version at /opt/rh/postgresql92/root/usr/bin/pg_dump, probably we need to update db-controll to look for the PG9.2 version of tools first?

Comment 2 Stephen Herr 2014-11-18 21:20:07 UTC
If someone more familiar with Perl wants to take this in the morning then feel free, otherwise I'll start working on it when I get in.

I think that the references to /usr/bin/pg_dump and /usr/bin/pg_restore in BackupCommands.pm need to be updated to have a prefix of "/opt/rh/postgresql92/root" if we're on a postgresql92 database.

Comment 3 Michael Mráka 2014-11-20 21:23:16 UTC
Fixed in spacewalk master by
commit 5bd3cbfeea81543f25a9749309017d58b83bbe19
    1165057 - use scl wrapper for postgresql92 binaries
commit 74dbe3a6bb88f29e7cef6fa702e9daab77fde708
    1165057 - use correct path for postgresql92

Comment 4 Michael Mráka 2014-11-20 21:43:09 UTC
Backported to SATELLITE-5.7 as
commit ce26269c4e171772d798546ac78d645f299efb54
    1165057 - use scl wrapper for postgresql92 binaries
commit 8e905a5b76fc15f6df642be4edbc626dd7885464
    1165057 - use correct path for postgresql92

Comment 6 Pavel Studeník 2014-11-24 18:05:27 UTC
verified with spacewalk-dobby-2.3.2-19.el6sat.noarch 

>> db-control online-backup /tmp/online-backup
Backing up to file /tmp/online-backup.
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading extensions
....
pg_dump: dumping contents of table web_user_prefix
pg_dump: dumping contents of table web_user_site_info
pg_dump: dumping contents of table web_user_site_type
Backup complete.

Comment 7 Clifford Perry 2015-01-13 10:26:28 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: This bug has not been re-verified (moved to RELEASE_PENDING) prior to release. We assume that the bug has indeed been fixed and not regressed since we initially verified it. Please re-open in the future if needed.


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