From ee40c2d2431825f36a01108115b3913112e2ef54 Mon Sep 17 00:00:00 2001 From: Kamoltat Date: Wed, 2 Mar 2022 16:52:57 +0000 Subject: [PATCH] mon, pybind/mgr: Add additional debug level logs for pool options We find that these logs helped with the debugging process issues like: https://tracker.ceph.com/issues/54263. Added debug level logs to `do_set_pool()` in src/mon/OSDMonitor.cc. Added debug level logs to `_maybe_adjust()` in src/pybind/mgr/pg_autoscaler/module.py. Signed-off-by: Kamoltat --- src/mon/OSDMonitor.cc | 2 ++ src/pybind/mgr/pg_autoscaler/module.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 7a62573897d6c..99a1a6bb9c3d6 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -4926,6 +4926,8 @@ void OSDMonitor::do_set_pool_opt(int64_t pool_id, pool_opts_t::key_t opt, pool_opts_t::value_t val) { + dout(10) << __func__ << " pool: " << pool_id << " option: " << opt + << " val: " << val << dendl; auto p = pending_inc.new_pools.try_emplace( pool_id, *osdmap.get_pg_pool(pool_id)); p.first->second.opts.set(opt, val); diff --git a/src/pybind/mgr/pg_autoscaler/module.py b/src/pybind/mgr/pg_autoscaler/module.py index 7a5282556285e..c84ecd23e4ddd 100644 --- a/src/pybind/mgr/pg_autoscaler/module.py +++ b/src/pybind/mgr/pg_autoscaler/module.py @@ -688,6 +688,8 @@ class PgAutoscaler(MgrModule): if osdmap.get_require_osd_release() < 'nautilus': return pools = osdmap.get_pools_by_name() + self.log.debug("pool: {0}".format(json.dumps(pools, indent=4, + sort_keys=True))) ps, root_map = self._get_pool_status(osdmap, pools) # Anyone in 'warn', set the health message for them and then -- 2.39.5