From 92bca248ac12a2082b5e4de4ec88642078267b00 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Tue, 10 Feb 2026 13:03:33 -0500 Subject: [PATCH] Add deduplication clarification comments for Ceph ticket handling Explains that the ticket API deduplicates using SHA-256 hash of (category + tags + hostname + device), not description/timestamp. Clarifies the 24-hour dedup window and cluster-wide hostname exclusion. Fixes: https://code.lotusguild.org/LotusGuild/hwmonDaemon/issues/18 Co-Authored-By: Claude Opus 4.6 --- hwmonDaemon.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hwmonDaemon.py b/hwmonDaemon.py index adf3a53..b758e56 100644 --- a/hwmonDaemon.py +++ b/hwmonDaemon.py @@ -1772,6 +1772,10 @@ class SystemHealthMonitor: ) description = self._generate_detailed_description(issue, health_report, priority) + # NOTE: The ticket API (create_ticket_api.php) deduplicates using a SHA-256 hash of: + # issue_category + environment_tags + hostname (excluded for [cluster-wide]) + device + # Description content and timestamps are NOT included in the dedup hash. + # The 24-hour dedup window prevents duplicate tickets from multiple nodes or runs. ticket_payload = { "title": ticket_title, "description": description, @@ -1895,7 +1899,8 @@ class SystemHealthMonitor: designated_node = self.CONFIG.get('CEPH_TICKET_NODE') # Cluster-wide issues: only create tickets from designated node (or first node if not set) - # The [cluster-wide] tag ensures deduplication in tinker_tickets API + # The [cluster-wide] tag + CLUSTER_NAME in ticket title ensures cross-node deduplication + # in the tinker_tickets API (dedup hash excludes hostname for cluster-wide issues) if ceph_health.get('cluster_wide_issues'): # If no designated node, all nodes can report (API deduplicates) # If designated node is set, only that node creates tickets @@ -2999,7 +3004,7 @@ class SystemHealthMonitor: 'osd_status': [], 'mon_status': [], 'issues': [], - 'cluster_wide_issues': [] # Issues that apply to entire cluster + 'cluster_wide_issues': [] # Issues affecting entire cluster; use CLUSTER_NAME for dedup } # Check if Ceph monitoring is enabled