Bug #43383
closedmgr: restful socket was not closed properly.
0%
Description
How to reproduce:
1. Use the `ceph mgr module disable restful` command to disable restful
2. Use `ceph mgr module enable restful` to enable restful
check at mgr.x.log, the following error is reported:
2019-12-19T16:38:18.248+0800 7fdf48e18700 0 [restful] [ERROR] [root] Traceback (most recent call last):
File "/home/irteamsu/Desktop/vscode/github/ceph/src/pybind/mgr/restful/module.py", line 256, in serve
self._serve()
File "/home/irteamsu/Desktop/vscode/github/ceph/src/pybind/mgr/restful/module.py", line 330, in serve
hooks = [ErrorHook()], # use a callable if pecan >= 0.3.2
File "/usr/lib/python2.7/site-packages/werkzeug/serving.py", line 486, in make_server
passthrough_errors, ssl_context)
File "/usr/lib/python2.7/site-packages/werkzeug/serving.py", line 410, in init
HTTPServer._init__(self, (host, int(port)), handler)
File "/usr/lib64/python2.7/SocketServer.py", line 419, in init
self.server_bind()
File "/usr/lib64/python2.7/BaseHTTPServer.py", line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File "/usr/lib64/python2.7/SocketServer.py", line 430, in server_bind
self.socket.bind(self.server_address)
File "/usr/lib64/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use
after handle `MSG_MGR_MAP`, mgr does not seem to close the restful socket when replacing threads through respwan. Is this a BUG? If so, how should it be fixed?
is this PR helpful to this bug?: https://github.com/ceph/ceph/pull/20365