rhn-schema-version crashes when DB is not up in Satellite 5

Solution In Progress - Updated -

Issue

There is a daily cron job /etc/cron.daily/schema-upgrade-notif that calls /usr/bin/rhn-schema-version and compares it with the satellite-schema version. Unfortunately, when the database is down, /usr/bin/rhn-schema-version crashes with the following trace:

/usr/bin/rhn-schema-version

Traceback (most recent call last):
File "/usr/bin/rhn-schema-version", line 49, in
rhnSQL.initDB()
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/init.py", line 151, in initDB
closeDB()
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/init.py", line 189, in closeDB
__DB.commit()
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 230, in commit
self.dbh.commit()
AttributeError: Database instance has no attribute 'dbh'

Abrtd sends an email with this crash report daily, every time this script runs.

Environment

Red Hat Satellite 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.