]> git.apps.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)
committerSage Weil <sage@newdream.net>
Fri, 3 Dec 2021 02:15:47 +0000 (21:15 -0500)
Signed-off-by: Sage Weil <sage@newdream.net>
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 d0653c2a8eda906dd0ed0666b831e1445a620ac2..192bec71ae08365e2783bb071cc3e7153f6ad0b0 100644 (file)
@@ -123,6 +123,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 2963af3a089045bed5fac2a2ab5e1640f91bb08c..17e94b25b53372ebe2a3cd19f2396d1db196e0ae 100644 (file)
@@ -277,6 +277,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 c20ada657298a83b94eb9d14b9e785578eaf3bcf..5e891069e8f34def59174fe337ae2955e6ed1734 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 907c7026b7d150b7b8137c34288346064661c86a..0706dff65194a7e2c21c61aa8026adddd287999a 100644 (file)
@@ -46,6 +46,7 @@ class Module(MgrModule):
             desc='name prefix for any created local pool',
             runtime=True),
     ]
+    NOTIFY_TYPES = [NotifyType.osd_map]
 
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         super(Module, self).__init__(*args, **kwargs)
index 66b026bd706ddffc1e81ab85b847081af8678bc8..4d9165e478ccfa2e595925d64065901517762e5a 100644 (file)
@@ -16,6 +16,8 @@ class MDSAutoscaler(orchestrator.OrchestratorClientMixin, MgrModule):
     """
     MDS autoscaler.
     """
+    NOTIFY_TYPES = [NotifyType.fs_map]
+
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         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 97f99059931421ba55ff36220c2ef82e3e761be9..cb8391ecd08dabc12aa064e2f665443f5a397e9f 100644 (file)
@@ -227,6 +227,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)