Project

Profile

Help

Issue #648

closed

If the WSGI application fails to start, wsgi_application() returns None

Added by rbarlow about 9 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.4.3
Platform Release:
2.6.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:

Description

Description of problem:
If the WSGI application fails to start for any reason, our wsgi_application() function returns None[0]. This is not helpful for debugging, especially if the problem is that logging isn't working correctly. It should raise an informative Exception when this happens instead. Currently, it will print an uninformative error message in /var/log/httpd/ssl_error_log[1].

Version-Release number of selected component (if applicable):
2.4.3

How reproducible:
Every time.

Steps to Reproduce:
1. Edit the wsgi_application() function to raise an Exception in the try: block with an error message. Perhaps something like raise Exception("Oh no!")
2. Look at httpd's ssl_error_log.

Actual results:
You will see something like [1] in the error log.

Expected results:
You should see something useful (like "Oh no!") in the error log.

Additional info:
[0] https://github.com/pulp/pulp/blob/2.4-release/server/pulp/server/webservices/application.py#L125
[1] TypeError: 'NoneType' object is not callable and mod_wsgi (pid=25056): Exception occurred processing WSGI script '/srv/pulp/webservices.wsgi'.

+ This bug was cloned from Bugzilla Bug #1177018 +

Also available in: Atom PDF