From: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Date: Fri, 30 Jan 2026 04:47:40 +0000 (+0700)
Subject: doc/dev: add sequence diagrams back to health-reports.rst
X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b34da8f3f595eba3139eab7d5a3646fbf316d9e4;p=ceph.git
doc/dev: add sequence diagrams back to health-reports.rst
The sequence diagrams were removed in ce96ddd because they were causing
issues. Add them back as SVG images. Include as comments the source code
used to generate the diagrams.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
---
diff --git a/doc/dev/health-reports.rst b/doc/dev/health-reports.rst
index 69b953f94fd8..c916e673142a 100644
--- a/doc/dev/health-reports.rst
+++ b/doc/dev/health-reports.rst
@@ -15,6 +15,44 @@ Manager module
A Manager module calls the ``mgr.get('health')`` method for the same report
in the form of a JSON encoded string.
+The following diagrams outline the involved parties and how they interact when
+the clients query for the reports:
+
+.. Mermaid source of health_reports_sequence1.svg
+ sequenceDiagram
+ participant osd
+ participant mon
+ participant ceph-cli
+ osd->>+mon: update osdmap service
+ mon-->>-osd:
+ osd->>+mon: update osdmap service
+ mon-->>-osd:
+ ceph-cli->>+mon: send 'health' command
+ mon->>mon:
+ Note right of mon: gather checks from services
+ mon-->>-ceph-cli: checks and mutes
+
+.. image:: health_reports_sequence1.svg
+
+.. Mermaid source of health_reports_sequence2.svg
+ sequenceDiagram
+ participant osd
+ participant mon
+ participant mgr
+ participant mgr-module
+ mgr->>mon: subscribe for 'mgrdigest'
+ osd->>+mon: update osdmap service
+ mon-->>-osd:
+ osd->>+mon: update osdmap service
+ mon-->>-osd:
+ mon->>+mgr: send MMgrDigest
+ mgr->>mgr:
+ Note right of mgr: update cluster state
+ mgr-->>-mon:
+ mgr-module->>+mgr: mgr.get('health')
+ mgr-->>-mgr-module: health reports in JSON
+
+.. image:: health_reports_sequence2.svg
Where are the Reports Generated
===============================
@@ -43,6 +81,25 @@ using the same transaction. For instance:
- ``MDSMonitor`` persists the health metrics contained in the beacon sent by the MDS daemons
and prepares health reports when storing the pending changes.
+.. Mermaid source of health_reports_sequence3.svg
+ sequenceDiagram
+ participant mds
+ participant mon-mds
+ participant mon-health
+ participant ceph-cli
+ mds->>+mon-mds: send beacon
+ mon-mds->>mon-mds:
+ Note right of mon-mds: store health metrics in beacon
+ mon-mds-->>-mds:
+ mon-mds->>mon-mds:
+ Note right of mon-mds: encode_health(checks)
+ ceph-cli->>+mon-health: send 'health' command
+ mon-health->>+mon-mds: gather health checks
+ mon-mds-->>-mon-health:
+ mon-health-->>-ceph-cli: checks and mutes
+
+.. image:: health_reports_sequence3.svg
+
To add a new warning related to CephFS, for example, a good place to
start is ``MDSMonitor::encode_pending()``, where health reports are collected from
the latest ``FSMap`` and the health metrics reported by MDS daemons.
@@ -65,3 +122,34 @@ report metrics and status periodically to Manager using ``MMgrReport``. An
aggregated report is then sent periodically to the Monitor ``MgrStatMonitor``
service which persists the data to monstore.
+.. Mermaid source of health_reports_sequence4.svg
+ sequenceDiagram
+ participant service
+ participant mgr
+ participant mon-mgr-stat
+ participant mon-health
+ service->>+mgr: send(open)
+ mgr->>mgr:
+ Note right of mgr: register the new service
+ mgr-->>-service:
+ mgr->>+service: send(configure)
+ service-->>-mgr:
+ service->>+mgr: send(report)
+ mgr->>mgr:
+ Note right of mgr: update/aggregate service metrics
+ mgr-->>-service:
+ service->>+mgr: send(report)
+ mgr-->>-service:
+ mgr->>+mon-mgr-stat: send(mgr-report)
+ mon-mgr-stat->>mon-mgr-stat:
+ Note right of mon-mgr-stat: store health checks in the report
+ mon-mgr-stat-->>-mgr:
+ mon-health->>+mon-mgr-stat: gather health checks
+ mon-mgr-stat-->>-mon-health:
+ service->>+mgr: send(report)
+ mgr-->>-service:
+ service->>+mgr: send(close)
+ mgr-->>-service:
+
+.. image:: health_reports_sequence4.svg
+
diff --git a/doc/dev/health_reports_sequence1.svg b/doc/dev/health_reports_sequence1.svg
new file mode 100644
index 000000000000..39d32a848501
--- /dev/null
+++ b/doc/dev/health_reports_sequence1.svg
@@ -0,0 +1,102 @@
+
\ No newline at end of file
diff --git a/doc/dev/health_reports_sequence2.svg b/doc/dev/health_reports_sequence2.svg
new file mode 100644
index 000000000000..76364fd04da3
--- /dev/null
+++ b/doc/dev/health_reports_sequence2.svg
@@ -0,0 +1,102 @@
+
\ No newline at end of file
diff --git a/doc/dev/health_reports_sequence3.svg b/doc/dev/health_reports_sequence3.svg
new file mode 100644
index 000000000000..45cf149ed3b9
--- /dev/null
+++ b/doc/dev/health_reports_sequence3.svg
@@ -0,0 +1,102 @@
+
\ No newline at end of file
diff --git a/doc/dev/health_reports_sequence4.svg b/doc/dev/health_reports_sequence4.svg
new file mode 100644
index 000000000000..54ca918c680a
--- /dev/null
+++ b/doc/dev/health_reports_sequence4.svg
@@ -0,0 +1,102 @@
+
\ No newline at end of file