Remove object in wsgi LOG.info

Method start in Server class records log for wsgi server name, host
and port using its __dict__ which includes a socket object. i18n message
will deep copy each item's value in __dict__. In python2.6, deep copy
the socket object will raise "Exception RuntimeError" and can not be
caught. This makes manila-api run into a hang loop. This patch uses the
related properties instead of __dict__ object to fix the problem.

Change-Id: I7f099972fe7a79da35327e824ba71e5943f95d14
Closes-Bug: #1391432
This commit is contained in:
Nilesh Bhosale 2014-11-06 13:54:38 +05:30
parent e1a6133f18
commit 818ae29c4d
1 changed files with 2 additions and 1 deletions

View File

@ -227,7 +227,8 @@ class Server(object):
backlog=backlog)
self._server = eventlet.spawn(self._start)
(self._host, self._port) = self._socket.getsockname()[0:2]
LOG.info(_LI("Started %(name)s on %(_host)s:%(_port)s"), self.__dict__)
LOG.info(_LI("Started %(name)s on %(_host)s:%(_port)s"),
{'name': self.name, '_host': self._host, '_port': self._port})
@property
def host(self):