From bc4608f6c71bd8a498bfe5149a59042f6ea15c24 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Tue, 27 Oct 2020 18:00:52 +0000 Subject: [PATCH] mgr/rbd_support: store global schedule without localized prefix so it is still used after mgr failover Fixes: https://tracker.ceph.com/issues/48020 Signed-off-by: Mykola Golub (cherry picked from commit e46e80474f07af2b9324f9ec0e893ba6b5e72033) --- src/pybind/mgr/rbd_support/schedule.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/rbd_support/schedule.py b/src/pybind/mgr/rbd_support/schedule.py index 795f8f5fe2b0d..d07b028259218 100644 --- a/src/pybind/mgr/rbd_support/schedule.py +++ b/src/pybind/mgr/rbd_support/schedule.py @@ -343,7 +343,7 @@ class Schedules: def load(self, namespace_validator=None, image_validator=None): - schedule_cfg = self.handler.module.get_localized_module_option( + schedule_cfg = self.handler.module.get_module_option( self.handler.MODULE_OPTION_NAME, '') if schedule_cfg: try: @@ -420,8 +420,8 @@ class Schedules: def save(self, level_spec, schedule): if level_spec.is_global(): - schedule_cfg = schedule and schedule.to_json() or '' - self.handler.module.set_localized_module_option( + schedule_cfg = schedule and schedule.to_json() or None + self.handler.module.set_module_option( self.handler.MODULE_OPTION_NAME, schedule_cfg) return -- 2.39.5