WAN degraded: a modem restart resets the judgement
Lint / JS (eslint) (push) Successful in 10s
Lint / Python (flake8) (push) Successful in 49s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Lint / JS (eslint) (pull_request) Successful in 11s
Lint / Python (flake8) (pull_request) Successful in 50s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (push) Successful in 1m8s
Test / Python Tests (pytest) (push) Successful in 1m21s
Security / Python Security (bandit) (pull_request) Successful in 1m5s
Test / Python Tests (pytest) (pull_request) Successful in 1m31s
Lint / JS (eslint) (push) Successful in 10s
Lint / Python (flake8) (push) Successful in 49s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Lint / JS (eslint) (pull_request) Successful in 11s
Lint / Python (flake8) (pull_request) Successful in 50s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (push) Successful in 1m8s
Test / Python Tests (pytest) (push) Successful in 1m21s
Security / Python Security (bandit) (pull_request) Successful in 1m5s
Test / Python Tests (pytest) (pull_request) Successful in 1m31s
Only health periods from 15 minutes after the latest restart count, so a slowdown the restart fixed neither opens a ticket on deploy nor holds one open. Replay: opens 11-24 01:30, resolves 04:20 after the reboot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a31437f2e5
commit
3e3069d2aa
4 files changed
+19
-2
No files matched your search
@@ -1240,6 +1240,15 @@ class TestWanDegraded:
|
||||
mon._process_wan_degraded(None, [])
|
||||
assert not db.upsert_event.called and not db.resolve_event.called
|
||||
|
||||
def test_a_restart_resets_the_judgement(self, mon, db):
|
||||
# 2026-11-24: hours of loss, then a reboot 50 minutes ago, fine since
|
||||
end = time.time()
|
||||
history = json.dumps({'outages': [], 'restarts': [{'at': end - 3000, 'by': None}]})
|
||||
db.get_state.side_effect = lambda k, d=None: history if k == 'wan_history' else None
|
||||
mon._process_wan_degraded(_timeline(['loss'] * 16 + ['down'] * 2 + ['ok'] * 6, end), [])
|
||||
assert not db.upsert_event.called
|
||||
db.resolve_event.assert_called_with('wan_degraded', 'att-modem', '')
|
||||
|
||||
def test_slow_ping_from_the_modem_is_mentioned(self, mon, db):
|
||||
checks = json.dumps({'ping': {'verdict': 'gateway', 'avg_ms': 1154}})
|
||||
db.get_state.side_effect = lambda k, d=None: checks if k == 'modem_checks' else None
|
||||
|
||||
Reference in new issue
Block a user