]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: annotate which events modules consume
authorSage Weil <sage@newdream.net>
Thu, 2 Dec 2021 15:23:22 +0000 (10:23 -0500)
committerNeha Ojha <nojha@redhat.com>
Wed, 16 Feb 2022 17:20:47 +0000 (17:20 +0000)
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 95ca3a444505b5bd38f4961ed63760ac45abcf64)

 Conflicts:
src/pybind/mgr/mds_autoscaler/module.py - trivial resolution

src/pybind/mgr/cephadm/module.py
src/pybind/mgr/dashboard/module.py
src/pybind/mgr/insights/module.py
src/pybind/mgr/k8sevents/module.py
src/pybind/mgr/localpool/module.py
src/pybind/mgr/mds_autoscaler/module.py
src/pybind/mgr/mirroring/module.py
src/pybind/mgr/restful/module.py
src/pybind/mgr/stats/module.py

index a9ef41cb81ed147dcd6a2a0a1a255017215393fc..c876de9c61e98ee01f02770e27a7557b58309f8d 100644 (file)
@@ -138,6 +138,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
     _STORE_HOST_PREFIX = "host"
 
     instance = None
+    NOTIFY_TYPES = [NotifyType.mon_map, NotifyType.pg_summary]
     NATIVE_OPTIONS = []  # type: List[Any]
     MODULE_OPTIONS = [
         Option(
index 37f39e24ff0b5109cf40f57e7930e57579050128..1b0cebd36a24446431cd69d81ea0b17476a54fce 100644 (file)
@@ -276,6 +276,8 @@ class Module(MgrModule, CherryPyConfig):
     for options in PLUGIN_MANAGER.hook.get_options() or []:
         MODULE_OPTIONS.extend(options)
 
+    NOTIFY_TYPES = [NotifyType.clog]
+
     __pool_stats = collections.defaultdict(lambda: collections.defaultdict(
         lambda: collections.deque(maxlen=10)))  # type: dict
 
index ce3fadc2af70ae5fddf4b30e2548fc40817234dc..12c88e73e1667d0b700d20d26a3d870dd0f76556 100644 (file)
@@ -20,6 +20,9 @@ ON_DISK_VERSION = 1
 
 
 class Module(MgrModule):
+
+    NOTIFY_TYPES = [NotifyType.health]
+
     def __init__(self, *args, **kwargs):
         super(Module, self).__init__(*args, **kwargs)
 
index 8c1521bfbda3fb22e71a286bcfc55fde0c2f739e..b3402920974e5ff8e30f3c504e7d3185b913fb01 100644 (file)
@@ -1051,6 +1051,7 @@ class Module(MgrModule):
          'default': 7,
          'desc': "Days to hold ceph event information within local cache"}
     ]
+    NOTIFY_TYPES = [NotifyType.clog]
 
     def __init__(self, *args, **kwargs):
         self.run = True
index 55bdd4ffc7593b16bf2642d010f08ec4d034f73b..b8546601366b8eff0c9cc0e15d899a37e237e00e 100644 (file)
@@ -47,6 +47,7 @@ class Module(MgrModule):
             'runtime': True,
         },
     ]
+    NOTIFY_TYPES = [NotifyType.osd_map]
 
     def __init__(self, *args, **kwargs):
         super(Module, self).__init__(*args, **kwargs)
index b95bf35fbb7bf724f21593aab31eaa13d7c550e8..c9fdcd8922fb117cd9f918bf1bd02d16c98cf69a 100644 (file)
@@ -16,6 +16,7 @@ class MDSAutoscaler(orchestrator.OrchestratorClientMixin, MgrModule):
     """
     MDS autoscaler.
     """
+    NOTIFY_TYPES = [NotifyType.fs_map]
     def __init__(self, *args, **kwargs):
         MgrModule.__init__(self, *args, **kwargs)
         self.set_mgr(self)
index 196cb8e6c099aa26ca7c1af7a9b6539728e4e4b2..4b4354ab2b9c4e0ede13153b2cac5d62f560137a 100644 (file)
@@ -6,6 +6,7 @@ from .fs.snapshot_mirror import FSSnapshotMirror
 
 class Module(MgrModule):
     MODULE_OPTIONS: List[Option] = []
+    NOTIFY_TYPES = [NotifyType.fs_map]
 
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
index 4c2f1d68e6e9cb4362b3dcc87caf7e6ccc4e2941..3eb98a71e6a2cd9d15e8686bc36a0b61b1f7057e 100644 (file)
@@ -228,6 +228,8 @@ class Module(MgrModule):
         },
     ]
 
+    NOTIFY_TYPES = [NotifyType.command]
+
     def __init__(self, *args, **kwargs):
         super(Module, self).__init__(*args, **kwargs)
         context.instance = self
index 5d74aeb1d81ee684b56b912181d4e95b23bdbcbe..d942c19e87bba5bf6fc887e292b7e569d2c652d2 100644 (file)
@@ -21,6 +21,7 @@ class Module(MgrModule):
         },
     ]
     MODULE_OPTIONS: List[Option] = []
+    NOTIFY_TYPES = [NotifyType.command]
 
     def __init__(self, *args, **kwargs):
         super(Module, self).__init__(*args, **kwargs)