From 372b6350ba0c7b770df252261a169272ada0d465 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Mon, 4 Nov 2019 22:12:48 -0800 Subject: [PATCH] pybind/mgr/pg_autoscaler: implement shutdown method Otherwise the mgr cannot shutdown because it waits for the pg_autoscaler thread forever. Fixes: https://tracker.ceph.com/issues/42640 Signed-off-by: Patrick Donnelly --- src/pybind/mgr/pg_autoscaler/module.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pybind/mgr/pg_autoscaler/module.py b/src/pybind/mgr/pg_autoscaler/module.py index 0f8dd1bde87..345fc7e1860 100644 --- a/src/pybind/mgr/pg_autoscaler/module.py +++ b/src/pybind/mgr/pg_autoscaler/module.py @@ -175,6 +175,10 @@ class PgAutoscaler(MgrModule): self._update_progress_events() self._shutdown.wait(timeout=int(self.sleep_interval)) + def shutdown(self): + self.log.info('Stopping pg_autoscaler') + self._shutdown.set() + def get_subtree_resource_status(self, osdmap, crush): """ For each CRUSH subtree of interest (i.e. the roots under which -- 2.39.5