Bug 1167770

Summary: satellite-upgrade-estimates when told I'm going to migrate from Oracle to PostgreSQL while on PostgreSQL fails with: psycopg2.ProgrammingError: relation "user_segments" does not exist at character 44
Product: Red Hat Satellite 5 Reporter: Jan Hutař <jhutar>
Component: UpgradesAssignee: Stephen Herr <sherr>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Hutař <jhutar>
Severity: low Docs Contact:
Priority: unspecified    
Version: 570CC: tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhn-upgrade-5.7.0.11-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-13 10:25:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1128174    

Description Jan Hutař 2014-11-25 11:40:57 UTC
Description of problem:
satellite-upgrade-estimates when told I'm going to migrate from Oracle to PostgreSQL while on PostgreSQL fails (that's OK) with: psycopg2.ProgrammingError: relation "user_segments" does not exist at character 44 (I would expect more user friendly message)


Version-Release number of selected component (if applicable):
rhn-upgrade-5.7.0.6-1.el5sat


How reproducible:
always


Steps to Reproduce:
1. Install Satellite 5.6.0 with embedded PostgreSQL
2. Run satellite-upgrade-estimates and say it you are going to migrate from Oracle to PostgreSQL


Actual results:
# /etc/sysconfig/rhn/satellite-upgrade/scripts/satellite-upgrade-estimates
Will you be upgrading both the operating system and Red Hat Satellite? [N] Y
Will you be migrating your Red Hat Satellite database from Oracle to PostgreSQL? [N] Y

Computing ...
Traceback (most recent call last):
  File "/etc/sysconfig/rhn/satellite-upgrade/scripts/satellite-upgrade-estimates", line 227, in ?
    oracle_db_size = get_oracle_db_size()
  File "/etc/sysconfig/rhn/satellite-upgrade/scripts/satellite-upgrade-estimates", line 126, in get_oracle_db_size
    h.execute()
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 163, in execute
    return apply(self._execute_wrapper, (self._execute, ) + p, kw)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 273, in _execute_wrapper
    retval = apply(function, p, kw)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 217, in _execute
    return self._execute_(args, kwargs)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 287, in _execute_
    self._real_cursor.execute(self.sql, params)
psycopg2.ProgrammingError: relation "user_segments" does not exist at character 44


Expected results:
Either that question should not be asked on Satellite with PostgreSQL or some nice error message should be printed

Comment 4 Clifford Perry 2015-01-13 10:25:44 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.