Bug 1165252

Summary: Incomprehensible exception when there is error while connecting to DB
Product: Red Hat Satellite 5 Reporter: Matej Kollar <mkollar>
Component: ServerAssignee: Matej Kollar <mkollar>
Status: CLOSED CURRENTRELEASE QA Contact: Ales Dujicek <adujicek>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: adujicek, cperry, mmello, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-backend-2.3.3-15-sat Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1171950 (view as bug list) Environment:
Last Closed: 2015-01-13 09:55:06 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: 465198, 1127641    

Description Matej Kollar 2014-11-18 15:56:06 UTC
Description of problem:

  When there is a problem while connecting to database, language exception (missing variable) occurs instead of comprehensible exception:

How reproducible: always/deterministic

Steps to Reproduce:
  1. cut off connection to postgre database
  2. restart osa-dispatcher, look into logs


Actual results:

Starting osa-dispatcher: Spacewalk 22134 2014/10/09 16:56:26 -04:00: ('Error caught:',)
Spacewalk 22134 2014/10/09 16:56:26 -04:00: ('Traceback (most recent call last):\n  File "/usr/share/rhn/osad/jabber_lib.py", line 118, in main\n    self.setup_config(config)\n  File "/usr/share/rhn/osad/osa_dispatcher.py", line 112, in setup_config\n    rhnSQL.initDB()\n  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/__init__.py", line 148, in initDB\n    del __DB2\nNameError: global name \'__DB2\' is not defined\n',)

Expected results:

  database exception...

Additional info:

This bug is carved out of bug #1151386 where described behavior was mentioned first, to allow fix and verify this separately.

Comment 1 Matej Kollar 2014-11-18 15:57:48 UTC
Upstream work
spacewalk.git 69268d9bca54633ae9845ecdab99bac42e9c9705

Comment 9 Clifford Perry 2015-01-13 09:55:06 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