mgr/ActivePyModules.cc: use wrappers for acquiring/releasing GIL
this change is a follow-up of
0601b31a53a455f0b67c981460d198cb3a97f3de, for couple reasons
- document the guideline for locking when working with python GIL
- add primitives to extract the patterns for acquiring/releasing
GIL. so they can be reused.
Fixes: https://tracker.ceph.com/issues/39264
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
9c652fb305a3e3d1b4a752bac9bd8a85d15c7de9)
Conflicts:
src/mgr/ActivePyModules.cc
src/mgr/DaemonState.cc
- convert std::pair to DaemonKey::type-name in a few places
- Removed "mds_metadata" which doesn't exist in latest Nautilus