Project

Profile

Help

Issue #648

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

Added by rbarlow almost 7 years ago. Updated almost 3 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 +

History

#2 Updated by bmbouter almost 7 years ago

  • Severity changed from High to 3. High

#3 Updated by bcourt almost 7 years ago

  • Status changed from MODIFIED to 5

#5 Updated by pthomas@redhat.com almost 7 years ago

verified

#6 Updated by pthomas@redhat.com almost 7 years ago

  • Status changed from 5 to 6

#7 Updated by dkliban@redhat.com over 6 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#9 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF