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
/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?
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.
Fixed in spacewalk master by commit 5bd3cbfeea81543f25a9749309017d58b83bbe19 1165057 - use scl wrapper for postgresql92 binaries commit 74dbe3a6bb88f29e7cef6fa702e9daab77fde708 1165057 - use correct path for postgresql92
Backported to SATELLITE-5.7 as commit ce26269c4e171772d798546ac78d645f299efb54 1165057 - use scl wrapper for postgresql92 binaries commit 8e905a5b76fc15f6df642be4edbc626dd7885464 1165057 - use correct path for postgresql92
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.
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.