fix(reliability): clear boot marker on graceful shutdown (I1)
This commit is contained in:
@@ -5106,6 +5106,17 @@ def check_boot_marker():
|
||||
return False
|
||||
|
||||
|
||||
def _clear_boot_marker():
|
||||
"""Best-effort: a clean shutdown must not read as an unexpected reboot."""
|
||||
marker = globals().get('BOOT_MARKER')
|
||||
if not marker:
|
||||
return
|
||||
try:
|
||||
os.unlink(marker)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def startup_env_check(attempts=STARTUP_CHECK_ATTEMPTS,
|
||||
delay=STARTUP_CHECK_DELAY):
|
||||
"""Run and print the startup contract, allowing boot dependencies time.
|
||||
@@ -7143,6 +7154,10 @@ def _request_shutdown(signum=None, frame=None):
|
||||
LIVE_STOP.set()
|
||||
HEALTH_STOP.set()
|
||||
_recon_hopper_stop.set()
|
||||
try:
|
||||
_clear_boot_marker()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def _uci_iface_present(name):
|
||||
|
||||
Reference in New Issue
Block a user