Bug 1165852
| Summary: | entitlement-check.py: AttributeError: DEFAULT_DB | ||
|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Jan Hutař <jhutar> |
| Component: | Upgrades | Assignee: | Stephen Herr <sherr> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jan Hutař <jhutar> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 570 | CC: | lhellebr, rfreire, sherr, tkasparek, xdmoon |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | rhn-upgrade-5.7.0.6-1 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-01-20 11:18:08 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 | ||
Copying from bug 1165766: Same problem for recognize_guests.py script: # /etc/sysconfig/rhn/satellite-upgrade/scripts/recognize_guests.py Traceback (most recent call last): File "/etc/sysconfig/rhn/satellite-upgrade/scripts/recognize_guests.py", line 229, in ? main() File "/etc/sysconfig/rhn/satellite-upgrade/scripts/recognize_guests.py", line 102, in main db = options.db or CFG.DEFAULT_DB File "/usr/lib/python2.4/site-packages/spacewalk/common/rhnConfig.py", line 222, in __getattr__ raise AttributeError(key) AttributeError: DEFAULT_DB When you add: print 'options.db = ', options.db print 'CFG.DEFAULT_DB = ', CFG.DEFAULT_DB you get: # /etc/sysconfig/rhn/satellite-upgrade/scripts/recognize_guests.py options.db = None CFG.DEFAULT_DB = Traceback (most recent call last): File "/etc/sysconfig/rhn/satellite-upgrade/scripts/recognize_guests.py", line 231, in ? main() File "/etc/sysconfig/rhn/satellite-upgrade/scripts/recognize_guests.py", line 103, in main print 'CFG.DEFAULT_DB = ', CFG.DEFAULT_DB File "/usr/lib/python2.4/site-packages/spacewalk/common/rhnConfig.py", line 222, in __getattr__ raise AttributeError(key) AttributeError: DEFAULT_DB Re-verified rhn-upgrade-5.7.0.22-1 ./entitlement-check.py --rhn-cert=<file>.cert WARNING: versions of the supplied certificate [5.6] and the Satellite you are about to upgrade to [5.7] do not match. Upgrade entitlement test PASSED |
Description of problem: entitlement-check.py produces traceback: AttributeError: DEFAULT_DB Version-Release number of selected component (if applicable): Upgraded Satellite 5.6.0 on RHEL5 rhn-upgrade-5.7.0.5-1.el5sat python-psycopg2-2.0.14-3.el5sat How reproducible: always Steps to Reproduce: 1. # cd /etc/sysconfig/rhn/satellite-upgrade/scripts 2. # ./entitlement-check.py --rhn-cert=/root/satellite-engineering-qa-5.6.cert Actual results: # ./entitlement-check.py --rhn-cert=/root/satellite-engineering-qa-5.6.cert Traceback (most recent call last): File "./entitlement-check.py", line 328, in ? main() File "./entitlement-check.py", line 71, in main db = options.db or CFG.DEFAULT_DB File "/usr/lib/python2.4/site-packages/spacewalk/common/rhnConfig.py", line 222, in __getattr__ raise AttributeError(key) AttributeError: DEFAULT_DB Expected results: Should work Additional info: To me knowleadge DB is configured correctly: # grep db_ /etc/rhn/rhn.conf db_backend = postgresql db_user = rhnuser db_password = rhnpw db_name = rhnschema db_host = db_port = # echo "SELECT * FROM dual;" | spacewalk-sql --select-mode-direct - dummy ------- X (1 row)