Project

General

Profile

Bug #43383

mgr: restful socket was not closed properly.

Added by shi liu 2 months ago. Updated about 2 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
-
Category:
-
Target version:
% Done:

0%

Source:
Tags:
Backport:
mimic, nautilus
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

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


Related issues

Copied to mgr - Backport #43464: nautilus: mgr: restful socket was not closed properly. New
Copied to mgr - Backport #43465: mimic: mgr: restful socket was not closed properly. New

History

#1 Updated by Brad Hubbard 2 months ago

  • Project changed from Ceph to mgr

#2 Updated by Kefu Chai about 2 months ago

  • Status changed from New to Pending Backport
  • Backport set to mimic, nautilus
  • Pull request ID set to 32396

#3 Updated by Nathan Cutler about 1 month ago

  • Copied to Backport #43464: nautilus: mgr: restful socket was not closed properly. added

#4 Updated by Nathan Cutler about 1 month ago

  • Copied to Backport #43465: mimic: mgr: restful socket was not closed properly. added

Also available in: Atom PDF