feat(reliability): supervisor continuously enforces known-good UCI set
This commit is contained in:
@@ -4761,14 +4761,28 @@ def health_check():
|
||||
# Re-park periodically — parking never runs wifi reload, so it is safe
|
||||
# to repeat.
|
||||
h['ticks'] = h.get('ticks', 0) + 1
|
||||
if h['ticks'] % HEALTH_STA_PARK_INTERVAL == 0 and _sta_uplink_enabled():
|
||||
if h['ticks'] % HEALTH_STA_PARK_INTERVAL == 0:
|
||||
if _sta_uplink_enabled():
|
||||
try:
|
||||
_park_dummy_sta()
|
||||
h['last_action'] = 'dummy STA re-parked'
|
||||
import mk8_events
|
||||
mk8_events.log_event('guard_fix',
|
||||
msg='re-parked dummy_radio0 STA '
|
||||
'(stock reconvergence)')
|
||||
except Exception:
|
||||
pass
|
||||
# Continuous enforcement of the known-good set (boot-guard keys can
|
||||
# be dropped or flipped by stock reconvergence/profile restores).
|
||||
# clear_pool=False mid-run: never wipe collected SSIDs live.
|
||||
try:
|
||||
_park_dummy_sta()
|
||||
h['last_action'] = 'dummy STA re-parked'
|
||||
import mk8_events
|
||||
mk8_events.log_event('guard_fix',
|
||||
msg='re-parked dummy_radio0 STA '
|
||||
'(stock reconvergence)')
|
||||
import mk8_guard
|
||||
rep = mk8_guard.reconcile(clear_pool=False)
|
||||
if rep['changed']:
|
||||
import mk8_events
|
||||
mk8_events.log_event(
|
||||
'guard_fix', sev='warn',
|
||||
msg='reconciler re-applied: %s' % ','.join(rep['changed']))
|
||||
except Exception:
|
||||
pass
|
||||
h['mem_percent'] = _mem_percent()
|
||||
|
||||
Reference in New Issue
Block a user