ceph-mgr: hold lock while accessing the request list and submitting request
The request creation can fire up the notify event early and it can cause
a race condition where the actual request was not yet added to the
self.requests list which makes the submit_request() function waits
forever without accepting new requests.
https://marc.info/?l=ceph-devel&m=
154104291714160&w=2
Fixes: https://tracker.ceph.com/issues/36764
Signed-off-by: Jerry Lee <leisurelysw24@gmail.com>
(cherry picked from commit
b09aefc2d6af3de8cc3df30258dfdc639c919a9f)
Conflicts:
src/pybind/mgr/restful/module.py