mgr/ActivePyModules: refactor perf schema section management to use RAII
Refactor get_perf_schema_python() and get_unlabeled_perf_schema_python() to use Formatter::ObjectSection and Formatter::ArraySection RAII helpers instead of manual close_section() calls. Manual closes have have led to crashes when close_section() calls were left unguarded, for example when an OSD with no perf counters had it's perf counters queried. Fixes: https://tracker.ceph.com/issues/74693 Signed-off-by: stzuraski898 <steven.zuraski@ibm.com>
S
stzuraski898 committed
078b140ad162c8cb88f651ff9ab1be32af997588
Parent: cf5b149