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)
Reviewed: https:/ /review. opencontrail. org/13209 github. org/Juniper/ contrail- sandesh/ commit/ 6e4a88d1259fb06 71db00a9b9df03c c67b0afdf6
Committed: http://
Submitter: Zuul
Branch: R2.22-dev
commit 6e4a88d1259fb06 71db00a9b9df03c c67b0afdf6
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 4b52912ec729148 396e25c9d0)
Closes-Bug: #1461119
(cherry picked from commit 0a6de0758cc5588