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).
Reviewed: https:/ /review. opencontrail. org/13205 github. org/Juniper/ contrail- sandesh/ commit/ 0a6de0758cc5588 4b52912ec729148 396e25c9d0
Committed: http://
Submitter: Zuul
Branch: master
commit 0a6de0758cc5588 4b52912ec729148 396e25c9d0
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): print_exc( ) # XXX But this goes to stderr!
"""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 '-'*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: Idf31eaf976720b 7f991726fc73121 ef518c42ccd
Closes-Bug: #1461119