make bridge gone away message less alarming

master
Simon 3 weeks ago
parent 5016f91ca8
commit ecb2968db6

@ -576,7 +576,7 @@ def reset_static_tg(tg,ts,_tmout,system):
BRIDGES[str(tg)] = bridgetemp BRIDGES[str(tg)] = bridgetemp
except KeyError: except KeyError:
logger.exception('(%s) KeyError in reset_static_tg() - bridge gone away? TG: %s',system,tg) logger.debug('(%s) reset_static_tg() skipped - bridge already removed for TG: %s',system,tg)
return return
#def reset_default_reflector(reflector,_tmout,system): #def reset_default_reflector(reflector,_tmout,system):

@ -106,6 +106,9 @@
names or new report event fields. names or new report event fields.
- Expected dashboard impact is low if the dashboard reads event fields and - Expected dashboard impact is low if the dashboard reads event fields and
bridge entries by their existing keys. bridge entries by their existing keys.
- Downgraded the expected stale static-bridge reset message from an error
traceback to a debug log when options reload finds that a bridge key has
already been removed.
- Compatibility risk: `BRIDGE_SND` pickled bridge state may now include active - Compatibility risk: `BRIDGE_SND` pickled bridge state may now include active
TS1 `#reflector` entries. A dashboard that assumes every `#reflector` entry is TS1 `#reflector` entries. A dashboard that assumes every `#reflector` entry is
TS2-only may need an update; a dashboard that already respects `TS`, `TGID` TS2-only may need an update; a dashboard that already respects `TS`, `TGID`

@ -1627,6 +1627,18 @@ DEFAULT_DIAL_TS2: 92
self.assertEqual(entries[1], original_b) self.assertEqual(entries[1], original_b)
self.assertEqual(entries[2], original_c) self.assertEqual(entries[2], original_c)
def test_reset_static_tg_missing_bridge_logs_debug_only(self):
config = minimal_config(("MASTER-A",))
with DeterministicScenario(config=config) as scenario:
with self.assertLogs(scenario.bm.logger, level="DEBUG") as logs:
scenario.bm.reset_static_tg(23427, 2, 10, "MASTER-A")
output = "\n".join(logs.output)
self.assertIn("reset_static_tg() skipped - bridge already removed", output)
self.assertNotIn("ERROR", output)
self.assertNotIn("Traceback", output)
def test_remove_bridge_system_preserves_reflector_activation_trigger(self): def test_remove_bridge_system_preserves_reflector_activation_trigger(self):
config = minimal_config(("MASTER-A", "MASTER-B")) config = minimal_config(("MASTER-A", "MASTER-B"))
add_openbridge_system(config, "OBP-1", network_id=3001) add_openbridge_system(config, "OBP-1", network_id=3001)

Loading…
Cancel
Save

Powered by TurnKey Linux.