Comment 15 for bug 1461119

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/13205
Committed: http://github.org/Juniper/contrail-sandesh/commit/0a6de0758cc55884b52912ec729148396e25c9d0
Submitter: Zuul
Branch: master

commit 0a6de0758cc55884b52912ec729148396e25c9d0
Author: Sundaresan Rajangam <email address hidden>
Date: Thu Aug 20 00:22:30 2015 -0700

Patch handle_error() method in WSGIServer class

handle_error() method in BaseServer class spews exception message
in the stdout that interferes with the functioning of the supervisor.

def handle_error(self, request, client_address):
"""Handle an error gracefully. May be overridden.
The default is to print a traceback and continue.
"""
print '-'*40
print 'Exception happened during processing of request from',
print client_address
import traceback
traceback.print_exc() # XXX But this goes to stderr!
print '-'*40

In this case, the exception message was logged when the client closed
the socket connection before the response was sent.
Since the supervisor couldn't recognize this exception log, it stopped
sending futher notification to the nodemgr (event-listener).

Change-Id: Idf31eaf976720b7f991726fc73121ef518c42ccd
Closes-Bug: #1461119