Comment 19 for bug 1461119

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

Reviewed: https://review.opencontrail.org/15089
Committed: http://github.org/Juniper/contrail-sandesh/commit/6e4fcf1e16a7b19ad8ed360ee39c71b1706a91b3
Submitter: Zuul
Branch: R2.20

commit 6e4fcf1e16a7b19ad8ed360ee39c71b1706a91b3
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
(cherry picked from commit 0a6de0758cc55884b52912ec729148396e25c9d0)
(cherry picked from commit 6e4a88d1259fb0671db00a9b9df03cc67b0afdf6)