UI and API: Needs attention, incident pages, known conditions, /covering for Gandalf and hwmonDaemon
CI / Lint (flake8, house style) (pull_request) Successful in 56s
CI / Test (pytest) (pull_request) Successful in 53s
CI / Security (bandit, pip-audit) (pull_request) Successful in 1m8s
CI / Integration (MariaDB) (pull_request) Successful in 1m49s
CI / UI (screenshots) (pull_request) Failing after 1m7s
CI / Scan (secrets, workflows, shell, patterns) (pull_request) Successful in 1m58s
CI / Deploy (pull_request) Skipped
CI / Lint (flake8, house style) (pull_request) Successful in 56s
CI / Test (pytest) (pull_request) Successful in 53s
CI / Security (bandit, pip-audit) (pull_request) Successful in 1m8s
CI / Integration (MariaDB) (pull_request) Successful in 1m49s
CI / UI (screenshots) (pull_request) Failing after 1m7s
CI / Scan (secrets, workflows, shell, patterns) (pull_request) Successful in 1m58s
CI / Deploy (pull_request) Skipped
- thor/web/api.py: /api/incidents/covering (thor#1 pre-check), /api/incidents, /api/incident/<key>, machine keys by SHA-256 with optional source CIDRs, like Gandalf's (gandalf#68); 503 when the database is away so callers fail open. covered=true only when there is a ticket to comment on; shadow incidents are listed but never cover. - thor/web/ui.py + templates: Needs attention (incidents, Thor itself, timeline-only, known conditions seen again, unexplained symptoms), incident page (what happened, also seen, what Thor sent or would have sent, ticket text), known conditions. Read-only; CSP with nonces; Authelia identity shown only when it comes from NPM. Mobile nav drawer. - web_template v1.2 (8286bb2) vendored and checked against upstream in CI. - docs/contract.md: the /covering contract for the Gandalf and hwmonDaemon sessions. - scripts/ui_demo.py + scripts/screenshots.py, and a CI job that renders every page with replay data (desktop, mobile, dark, light) and uploads the screenshots. - Fix: systemd-escaped cpusets (system-ceph\x2dosd.slice) were not recognised as Ceph; four of the 11-23 kills came from the OSD slice. Found while reviewing the screenshots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6c2328c2b1
commit
ab4b20d15f
23 files changed
+9946
-9
No files matched your search
+11
-1
@@ -27,6 +27,13 @@ def test_query_regex_escapes_for_promql_strings():
|
||||
assert kernel_query(['compute-storage-01']).startswith('{job="journal", host=~"compute\\\\-storage\\\\-01"')
|
||||
|
||||
|
||||
def test_systemd_escaped_cpuset_is_recognised_as_ceph():
|
||||
line = GLOBAL.replace('cpuset=ceph-osd@3.service', 'cpuset=system-ceph\\x2dosd.slice')
|
||||
kill = parse_kills([(10.0, line, {})])[0]
|
||||
assert kill['cpuset'] == 'system-ceph-osd.slice'
|
||||
assert MemoryCheck._event('h', kill, {})['ceph'] is True
|
||||
|
||||
|
||||
def test_parse_kills_pairs_lines_and_reads_everything():
|
||||
kills = parse_kills([(10.0, GLOBAL, {}), (10.1, KILLED, {}), (20.0, MEMCG, {}),
|
||||
(30.0, 'Out of memory: Killed process 99 (x) anon-rss:1kB', {})])
|
||||
@@ -115,8 +122,11 @@ def test_memory_rules_summary_and_priority():
|
||||
assert m.priority(inc) == 3
|
||||
inc.events += [{'at': 600, 'guest': '154'}, {'at': 1200, 'guest': '154'}]
|
||||
assert m.priority(inc) == 2
|
||||
inc.symptoms = {'s': {'subject': 'storage-01', 'cluster_effect': True}}
|
||||
inc.symptoms = {'s': {'subject': 'storage-01', 'cluster_effect': True},
|
||||
'c': {'subject': 'cluster', 'cluster_effect': True}}
|
||||
assert m.priority(inc) == 1
|
||||
assert inc.facts['escalation_reason'] == ('While this host is out of memory, other hosts are stalling '
|
||||
'(storage-01) and Ceph raised new alerts.')
|
||||
inc.symptoms = {}
|
||||
inc.events.append({'at': 1300, 'guest': '155', 'ceph': True})
|
||||
assert m.priority(inc) == 1
|
||||
|
||||
Reference in new issue
Block a user