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: #18 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1772,6 +1772,10 @@ class SystemHealthMonitor:
|
|||||||
)
|
)
|
||||||
description = self._generate_detailed_description(issue, health_report, priority)
|
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 = {
|
ticket_payload = {
|
||||||
"title": ticket_title,
|
"title": ticket_title,
|
||||||
"description": description,
|
"description": description,
|
||||||
@@ -1895,7 +1899,8 @@ class SystemHealthMonitor:
|
|||||||
designated_node = self.CONFIG.get('CEPH_TICKET_NODE')
|
designated_node = self.CONFIG.get('CEPH_TICKET_NODE')
|
||||||
|
|
||||||
# Cluster-wide issues: only create tickets from designated node (or first node if not set)
|
# 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 ceph_health.get('cluster_wide_issues'):
|
||||||
# If no designated node, all nodes can report (API deduplicates)
|
# If no designated node, all nodes can report (API deduplicates)
|
||||||
# If designated node is set, only that node creates tickets
|
# If designated node is set, only that node creates tickets
|
||||||
@@ -2999,7 +3004,7 @@ class SystemHealthMonitor:
|
|||||||
'osd_status': [],
|
'osd_status': [],
|
||||||
'mon_status': [],
|
'mon_status': [],
|
||||||
'issues': [],
|
'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
|
# Check if Ceph monitoring is enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user