Network blip counts only connections the panel watches
At 07:45:55 the six tcp-HyperDeck helper connections (behind the 'reboot all' button, watched by no tile) flickered together; each counted as its own group, so NET showed a blip and auto-fix paused, though the real HyperDeck connections and everything else stayed up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -716,6 +716,7 @@ class Engine:
|
||||
self.group_of[m] = t["id"]
|
||||
self.detail_ids = [t["id"] for t in cfg["tiles"] if "checks" in t or t.get("kind") == "network"]
|
||||
self.prev_conn_bad = {}
|
||||
self.watched_conns = {c["conn"] for t in cfg["tiles"] for c in t.get("checks", []) if c.get("conn")}
|
||||
self.conn_good_at = {} # connection -> last time it was "good"
|
||||
self.conn_drops = deque() # (time, conn label, group)
|
||||
self.burst = None # {"start", "conns", "cleared"}
|
||||
@@ -780,6 +781,10 @@ class Engine:
|
||||
bad_now = set()
|
||||
if snap.conns_fresh(now):
|
||||
for label, c in snap.conns.items():
|
||||
if label not in self.watched_conns:
|
||||
# Helper connections no button watches (the six tcp-HyperDeck ones behind the
|
||||
# "reboot all" button flickered together on 2026-10-11) are not the network.
|
||||
continue
|
||||
bad = bool(c.get("enabled")) and c.get("category") == "error"
|
||||
if bad:
|
||||
bad_now.add(label)
|
||||
|
||||
@@ -541,6 +541,17 @@ class TestBehaviour(unittest.TestCase):
|
||||
engine.run_fixes("net", self.snap, None, t)
|
||||
self.assertEqual(engine.notes["net"]["text"], "NOTHING\nTO CLEAR")
|
||||
|
||||
def test_helper_connections_no_button_watches_are_not_a_blip(self):
|
||||
engine = sp.Engine(CONFIG)
|
||||
for i in range(1, 7):
|
||||
self.snap.conns["tcp-HyperDeck-%d" % i] = {"id": "t%d" % i, "enabled": True, "category": "good", "message": None}
|
||||
run_steps(engine, self.snap, SUNDAY, 2)
|
||||
for i in range(1, 7): # what happened at 07:45:55
|
||||
self.snap.conns["tcp-HyperDeck-%d" % i]["category"] = "error"
|
||||
tiles, _ = run_steps(engine, self.snap, SUNDAY + 3, 4)
|
||||
self.assertEqual(tiles["net"]["x"], "NET\nOK")
|
||||
self.assertIsNone(engine.burst)
|
||||
|
||||
def test_racks_powering_off_is_not_a_network_event(self):
|
||||
engine = sp.Engine(CONFIG)
|
||||
run_steps(engine, self.snap, SUNDAY, 2)
|
||||
|
||||
Reference in New Issue
Block a user