Ceph: aggregate per-OSD "is DOWN" tickets into one "host down" ticket #35

Open
opened 2026-11-08 23:34:45 -05:00 by jared · 2 comments
Owner

Problem

When a node goes down, hwmonDaemon opens one P2 ticket for every OSD on it, plus several summary tickets for the same event. Recent outages (2026-10-27, 10-28, 11-03, 11-04) produced 27 open Ceph OSD osd.N is DOWN tickets at once, alongside:

  • Ceph HEALTH_WARN: 7 osds down
  • Ceph HEALTH_WARN: 1 host (7 osds) down
  • Ceph HEALTH_WARN: 1/3 mons down, quorum ... (one ticket per quorum combination, because the quorum list is in the title)
  • Ceph HEALTH_WARN: Reduced data availability: 47 pgs inactive, 15 pgs down

The OSD tickets were never closed after recovery, so they all had to be closed by hand.

Where it happens

_check_ceph_health() in hwmonDaemon.py:

  1. ceph osd tree loop (around line 3594). Every OSD with status == 'down' appends f"Ceph OSD {name} is DOWN" to cluster_wide_issues. The host_id lookup just above it is computed but never used (# Simplified: just track all OSDs for now).
  2. ceph health checks loop (around line 3517). It also appends every HEALTH_WARN check as its own issue: OSD_DOWN, OSD_HOST_DOWN, MON_DOWN and PG_AVAILABILITY. Their messages contain counts and quorum lists, so the title changes from run to run and each change defeats dedup.

Proposed behaviour

Group down OSDs by their parent host bucket in ceph osd tree, using the children arrays of the host nodes.

  • Every OSD on a host is down: open one ticket, Ceph host <host> is DOWN (<n> OSDs: osd.a, osd.b, ...), P2, cluster-wide. Put the OSD list and the related symptoms in the body (mons down, PGs inactive/down, degraded objects), not in separate tickets.
  • Only some OSDs on a host are down (a real disk or OSD failure): keep a per-OSD ticket, with the host name in the title so it's actionable, e.g. Ceph OSD osd.15 on large1 is DOWN.
  • Suppress, while a host-down ticket is active: the OSD_DOWN, OSD_HOST_DOWN, MON_DOWN (when the down mon is on that host) and PG_AVAILABILITY / PG_DEGRADED health-check issues.
  • Stable titles: dedup keys must not include changing counts or quorum lists. Key on the check name plus the host, e.g. MON_DOWN:large1 rather than the full message.

Optional, related

  • Cross-check the host's node_exporter / ping status, so the ticket can say "host unreachable" versus "host up but ceph-osd services down".
  • Auto-close or comment when the host's OSDs return to up. Down tickets currently stay open forever after recovery.

Acceptance

  • A full-node outage creates exactly one Ceph ticket, plus at most the existing node-level "No metrics from host" ticket.
  • A single failed OSD still gets its own ticket, naming its host.
  • Titles stay the same across runs during one outage, so the API dedup hash matches.
  • Tests in tests/ cover: full host down, partial host down, and multiple hosts down.
## Problem When a node goes down, hwmonDaemon opens one P2 ticket for every OSD on it, plus several summary tickets for the same event. Recent outages (2026-10-27, 10-28, 11-03, 11-04) produced **27 open `Ceph OSD osd.N is DOWN` tickets** at once, alongside: - `Ceph HEALTH_WARN: 7 osds down` - `Ceph HEALTH_WARN: 1 host (7 osds) down` - `Ceph HEALTH_WARN: 1/3 mons down, quorum ...` (one ticket per quorum combination, because the quorum list is in the title) - `Ceph HEALTH_WARN: Reduced data availability: 47 pgs inactive, 15 pgs down` The OSD tickets were never closed after recovery, so they all had to be closed by hand. ## Where it happens `_check_ceph_health()` in `hwmonDaemon.py`: 1. **`ceph osd tree` loop (around line 3594).** Every OSD with `status == 'down'` appends `f"Ceph OSD {name} is DOWN"` to `cluster_wide_issues`. The `host_id` lookup just above it is computed but never used (`# Simplified: just track all OSDs for now`). 2. **`ceph health` checks loop (around line 3517).** It also appends every HEALTH_WARN check as its own issue: `OSD_DOWN`, `OSD_HOST_DOWN`, `MON_DOWN` and `PG_AVAILABILITY`. Their messages contain counts and quorum lists, so the title changes from run to run and each change defeats dedup. ## Proposed behaviour Group down OSDs by their parent `host` bucket in `ceph osd tree`, using the `children` arrays of the host nodes. - **Every OSD on a host is down:** open one ticket, `Ceph host <host> is DOWN (<n> OSDs: osd.a, osd.b, ...)`, P2, cluster-wide. Put the OSD list and the related symptoms in the body (mons down, PGs inactive/down, degraded objects), not in separate tickets. - **Only some OSDs on a host are down** (a real disk or OSD failure): keep a per-OSD ticket, with the host name in the title so it's actionable, e.g. `Ceph OSD osd.15 on large1 is DOWN`. - **Suppress, while a host-down ticket is active:** the `OSD_DOWN`, `OSD_HOST_DOWN`, `MON_DOWN` (when the down mon is on that host) and `PG_AVAILABILITY` / `PG_DEGRADED` health-check issues. - **Stable titles:** dedup keys must not include changing counts or quorum lists. Key on the check name plus the host, e.g. `MON_DOWN:large1` rather than the full message. ### Optional, related - Cross-check the host's node_exporter / ping status, so the ticket can say "host unreachable" versus "host up but ceph-osd services down". - Auto-close or comment when the host's OSDs return to `up`. Down tickets currently stay open forever after recovery. ## Acceptance - A full-node outage creates exactly **one** Ceph ticket, plus at most the existing node-level "No metrics from host" ticket. - A single failed OSD still gets its own ticket, naming its host. - Titles stay the same across runs during one outage, so the API dedup hash matches. - Tests in `tests/` cover: full host down, partial host down, and multiple hosts down.
Author
Owner

Requirement from the owner: when a server goes down, there should be exactly 1 ticket, at high priority.

That widens the scope beyond Ceph. A node outage must not produce separate tickets for its OSDs, mons, PGs, "No metrics from host", network, or anything else. All of those belong in the body of one host-down ticket, which should be P1 (or at least P2) and cluster-wide.

Suggested approach:

  • Decide whether the host is down first, in one pass that runs before anything else: Ceph OSD_HOST_DOWN or every OSD on the host down, the host missing from Proxmox / corosync membership, and node_exporter / ping failing.
  • If it is down, create or update the single [<host>] Host DOWN ticket. Suppress every other issue attributable to that host, and every cluster-wide symptom it causes: OSD_DOWN, MON_DOWN, PG_AVAILABILITY, PG_DEGRADED, recovery and backfill warnings, and quorum changes. List them in the ticket body or as comments.
  • Close it automatically when the host returns, or comment with the recovery time.

For reference: on 2026-11-08, 32 open tickets from 4 outages had to be closed by hand: 27 per-OSD, 2 osds/host-down summaries, 2 MON_DOWN and 1 PG_AVAILABILITY.

**Requirement from the owner: when a server goes down, there should be exactly 1 ticket, at high priority.** That widens the scope beyond Ceph. A node outage must not produce separate tickets for its OSDs, mons, PGs, "No metrics from host", network, or anything else. All of those belong in the body of one host-down ticket, which should be **P1** (or at least P2) and cluster-wide. Suggested approach: - **Decide whether the host is down first,** in one pass that runs before anything else: Ceph `OSD_HOST_DOWN` or every OSD on the host down, the host missing from Proxmox / corosync membership, and node_exporter / ping failing. - **If it is down,** create or update the single `[<host>] Host DOWN` ticket. Suppress every other issue attributable to that host, and every cluster-wide symptom it causes: OSD_DOWN, MON_DOWN, PG_AVAILABILITY, PG_DEGRADED, recovery and backfill warnings, and quorum changes. List them in the ticket body or as comments. - **Close it automatically** when the host returns, or comment with the recovery time. For reference: on 2026-11-08, 32 open tickets from 4 outages had to be closed by hand: 27 per-OSD, 2 osds/host-down summaries, 2 MON_DOWN and 1 PG_AVAILABILITY.
Author
Owner

Additional requirement: when multiple servers are down, open one P1 ticket.

If 2 or more hosts are down in the same run (and the ticketing system and DB are still reachable), don't open one host-down ticket per server. Open a single P1 [<cluster>] Multiple hosts DOWN (<n>/<total>): host-a, host-b ticket.

  • Escalation: if a single-host-down ticket is already open and a second host fails, escalate. Either convert/retitle it, or open the multi-host P1 and link the single-host ticket to it as a duplicate/child. Don't keep two parallel host tickets open.
  • Stable title: the hostnames should go in the body, or the title must stay stable as hosts are added or removed. Otherwise dedup breaks while the outage changes. A key such as MULTI_HOST_DOWN:<cluster> with the list in the body is safest.
  • Body: list every down host, the time each went down, quorum state (Proxmox + Ceph mons), and the Ceph data-availability summary (inactive/down PGs). That tells you at a glance whether data is unavailable or only degraded.
  • Ticket API unreachable: if the API or DB is down (likely when several nodes are out), queue the ticket locally and send it once the API returns. Optionally fall back to the Matrix/hookshot webhook, so the alert still reaches a human.
  • Recovery: step back down as hosts return (multi → single → closed), commenting at each change.

Rack- and switch-level failure domains are tracked separately in a future-redundancy issue.

**Additional requirement: when multiple servers are down, open one P1 ticket.** If 2 or more hosts are down in the same run (and the ticketing system and DB are still reachable), don't open one host-down ticket per server. Open a single **P1 `[<cluster>] Multiple hosts DOWN (<n>/<total>): host-a, host-b`** ticket. - **Escalation:** if a single-host-down ticket is already open and a second host fails, escalate. Either convert/retitle it, or open the multi-host P1 and link the single-host ticket to it as a duplicate/child. Don't keep two parallel host tickets open. - **Stable title:** the hostnames should go in the body, or the title must stay stable as hosts are added or removed. Otherwise dedup breaks while the outage changes. A key such as `MULTI_HOST_DOWN:<cluster>` with the list in the body is safest. - **Body:** list every down host, the time each went down, quorum state (Proxmox + Ceph mons), and the Ceph data-availability summary (inactive/down PGs). That tells you at a glance whether data is unavailable or only degraded. - **Ticket API unreachable:** if the API or DB is down (likely when several nodes are out), queue the ticket locally and send it once the API returns. Optionally fall back to the Matrix/hookshot webhook, so the alert still reaches a human. - **Recovery:** step back down as hosts return (multi → single → closed), commenting at each change. Rack- and switch-level failure domains are tracked separately in a future-redundancy issue.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/hwmonDaemon#35