From ccdc3e8ece4af2e6b2d029e8737291e2856dd6e3 Mon Sep 17 00:00:00 2001 From: Andrei Smaliak Date: Fri, 18 Sep 2026 16:13:13 +0200 Subject: [PATCH] Fix immediate systemd timeout when starting Edge stage updates --- docs/releases/stage-itscreen-1.0.4.md | 6 ++++++ offline/stage_versions.py | 3 ++- offline/test_stage_versions.py | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/releases/stage-itscreen-1.0.4.md b/docs/releases/stage-itscreen-1.0.4.md index 6f4c48d..e72c593 100644 --- a/docs/releases/stage-itscreen-1.0.4.md +++ b/docs/releases/stage-itscreen-1.0.4.md @@ -22,3 +22,9 @@ Packaged binary SHA-256: `aa44e8e8df69ba2e939ce23443c2a5c65dc10658d3dd2bc1fb81d8 - Native sensor_delay.test.js passes sustained signal, cancellation, timer, AND/OR, browser parity and MQTT lifecycle cases. - All 14 offline/test_stage_versions.py tests pass with the updated catalog. - The existing local player remained active during the build. No application install or physical-output trigger was executed on Villa as part of release preparation. + +## Update launcher correction (2026-09-18) + +Villa g-box-3f6db2ac rejected two update attempts before the installer executed: systemd reported `start operation timed out`, while Console stored `Cannot start installer`. A harmless transient-unit probe reproduced `TimeoutStartUSec=0` and `Result=timeout`. The same probe with explicit `TimeoutStartSec=infinity` succeeded. Zero passed through systemd-run is therefore unsuitable for disabling this timeout; success on another Edge depends on startup timing. + +The shared stage launcher now uses explicit infinity. Its unit test checks this contract; all 14 stage-update tests pass. The same owner was applied to Villa with a backup, restarting only Console; itscreen-x11 remained active. The binary and stage version remain 4.410.125 / 1.0.4. Refresh the release catalog before retrying so bootstrap retains the corrected updater from this commit. No automatic application install was performed during diagnosis. diff --git a/offline/stage_versions.py b/offline/stage_versions.py index 96d9e35..5a09c63 100644 --- a/offline/stage_versions.py +++ b/offline/stage_versions.py @@ -204,8 +204,9 @@ def start_install(stage, commit): try: (STATE / 'install.log').write_text('') # Independent system unit survives Console replacement and browser disconnect. + # Transient D-Bus units need explicit infinity: zero can mean immediate timeout. subprocess.run(['systemd-run', '--unit=' + unit, '--collect', - '--property=Type=exec', '--property=TimeoutStartSec=0', + '--property=Type=exec', '--property=TimeoutStartSec=infinity', '--property=StandardOutput=append:' + str(STATE / 'install.log'), '--property=StandardError=inherit', sys.executable, str(OWNER), 'install', stage, commit], diff --git a/offline/test_stage_versions.py b/offline/test_stage_versions.py index 2a954d3..b32ca73 100644 --- a/offline/test_stage_versions.py +++ b/offline/test_stage_versions.py @@ -73,6 +73,8 @@ class StageVersionsTest(unittest.TestCase): job = versions.start_install('stage_z2m', COMMIT) args = run.call_args.args[0] self.assertEqual('systemd-run', args[0]) + self.assertIn('--property=TimeoutStartSec=infinity', args) + self.assertNotIn('--property=TimeoutStartSec=0', args) self.assertEqual(['install', 'stage_z2m', COMMIT], args[-3:]) self.assertNotIn('shell', run.call_args.kwargs) self.assertEqual('queued', job['state'])