]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: add docstring describing the HostCache 38304/head
authorSebastian Wagner <sebastian.wagner@suse.com>
Thu, 26 Nov 2020 10:03:00 +0000 (11:03 +0100)
committerSebastian Wagner <sebastian.wagner@suse.com>
Thu, 26 Nov 2020 10:03:00 +0000 (11:03 +0100)
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/pybind/mgr/cephadm/inventory.py

index 9d8816aa60ff6c33b3d47230752ce240ff993b03..eb0c42faf96e89543de61ca9efd015facb8de45d 100644 (file)
@@ -21,6 +21,10 @@ SPEC_STORE_PREFIX = "spec."
 
 
 class Inventory:
+    """
+    The inventory stores a HostSpec for all hosts persistently.
+    """
+
     def __init__(self, mgr: 'CephadmOrchestrator'):
         self.mgr = mgr
         # load inventory
@@ -164,6 +168,36 @@ class SpecStore():
 
 
 class HostCache():
+    """
+    HostCache stores different things:
+
+    1. `daemons`: Deployed daemons O(daemons)
+
+    They're part of the configuration nowadays and need to be
+    persistent. The name "daemon cache" is unfortunately a bit misleading.
+    Like for example we really need to know where daemons are deployed on
+    hosts that are offline.
+
+    2. `devices`: ceph-volume inventory cache O(hosts)
+
+    As soon as this is populated, it becomes more or less read-only.
+
+    3. `networks`: network interfaces for each host. O(hosts)
+
+    This is needed in order to deploy MONs. As this is mostly read-only.
+
+    4. `last_etc_ceph_ceph_conf` O(hosts)
+
+    Stores the last refresh time for the /etc/ceph/ceph.conf. Used 
+    to avoid deploying new configs when failing over to a new mgr.
+
+    5. `scheduled_daemon_actions`: O(daemons)
+
+    Used to run daemon actions after deploying a daemon. We need to
+    store it persistently, in order to stay consistent across
+    MGR failovers.   
+    """
+
     def __init__(self, mgr):
         # type: (CephadmOrchestrator) -> None
         self.mgr: CephadmOrchestrator = mgr