From: Patrick Donnelly Date: Tue, 5 Nov 2019 06:12:48 +0000 (-0800) Subject: pybind/mgr/pg_autoscaler: implement shutdown method X-Git-Tag: v15.1.0~999^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=372b6350ba0c7b770df252261a169272ada0d465;p=ceph-ci.git 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 --- 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