Modify

Ticket #1035 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

bcfg2-web: exception when no 'statistics' section is found

Reported by: https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU Owned by: desai
Priority: major Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:

Description

mod_wsgi (pid=22438): Exception occurred processing WSGI script '/usr/share/bcfg2/reports.wsgi'.
 Traceback (most recent call last):
   File "/usr/lib/pymodules/python2.6/django/core/handlers/wsgi.py", line 230, in __call__
     self.load_middleware()
   File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py", line 33, in load_middleware
     for middleware_path in settings.MIDDLEWARE_CLASSES:
   File "/usr/lib/pymodules/python2.6/django/utils/functional.py", line 276, in __getattr__
     self._setup()
   File "/usr/lib/pymodules/python2.6/django/conf/__init__.py", line 40, in _setup
     self._wrapped = Settings(settings_module)
   File "/usr/lib/pymodules/python2.6/django/conf/__init__.py", line 73, in __init__
     mod = importlib.import_module(self.SETTINGS_MODULE)
   File "/usr/lib/pymodules/python2.6/django/utils/importlib.py", line 35, in import_module
     __import__(name)
   File "/usr/lib/pymodules/python2.6/Bcfg2/Server/Reports/settings.py", line 27, in <module>
     db_engine = c.get('statistics', 'database_engine')
   File "/usr/lib/python2.6/ConfigParser.py", line 532, in get
     raise NoSectionError(section)
 NoSectionError: No section: 'statistics'

I expected some more user-friendly message instead of 500 Internal Server Error when bcfg2 is not configured.

Attachments

Change History

comment:1 Changed 11 years ago by https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU

  • Summary changed from bcfg-web2: exception when no 'statistics' section is found to bcfg2-web: exception when no 'statistics' section is found

comment:2 Changed 11 years ago by https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU

The exception is also thrown when web server process don't have access to read /etc/bcfg2.conf (which is the default situation).

comment:3 Changed 11 years ago by solj

  • Status changed from new to closed
  • Resolution set to fixed

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.