diff --git a/src/pybind/mgr/rbd_support/schedule.py b/src/pybind/mgr/rbd_support/schedule.py index d07b028259218..09e9a26a9ea79 100644 --- a/src/pybind/mgr/rbd_support/schedule.py +++ b/src/pybind/mgr/rbd_support/schedule.py @@ -345,6 +345,18 @@ def load(self, namespace_validator=None, image_validator=None): schedule_cfg = self.handler.module.get_module_option( self.handler.MODULE_OPTION_NAME, '') + + # Previous versions incorrectly stored the global config in + # the localized module option. Check the config is here and fix it. + if not schedule_cfg: + schedule_cfg = self.handler.module.get_localized_module_option( + self.handler.MODULE_OPTION_NAME, '') + if schedule_cfg: + self.handler.module.set_module_option( + self.handler.MODULE_OPTION_NAME, schedule_cfg) + self.handler.module.set_localized_module_option( + self.handler.MODULE_OPTION_NAME, None) + if schedule_cfg: try: level_spec = LevelSpec.make_global()