From fc6f58b00e627a0837bbf17178a5e0ad3c28a8db Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 17:04:40 +0000 Subject: [PATCH 1/2] Initial plan From 40c2d178334ecddcba60688b573bd927aa8674be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 17:07:07 +0000 Subject: [PATCH 2/2] fix: route hub reboot through forced systemd reboot unit Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/c72ca380-983e-4811-98f7-98f883ef46dc Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- app/sovran_systemsos_web/server.py | 5 +++-- modules/core/sovran-hub.nix | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/sovran_systemsos_web/server.py b/app/sovran_systemsos_web/server.py index 19d792b..4a3aa6f 100644 --- a/app/sovran_systemsos_web/server.py +++ b/app/sovran_systemsos_web/server.py @@ -49,6 +49,7 @@ UPDATE_UNIT = "sovran-hub-update.service" REBUILD_LOG = "/var/log/sovran-hub-rebuild.log" REBUILD_STATUS = "/var/log/sovran-hub-rebuild.status" REBUILD_UNIT = "sovran-hub-rebuild.service" +REBOOT_UNIT = "sovran-hub-reboot.service" # Set to True by _startup_recover_stale_status() when it corrects a stale # RUNNING → SUCCESS/FAILED for the update unit. Consumed by the first call @@ -2052,7 +2053,7 @@ async def api_upgrade_to_server(): # and ports first via the onboarding wizard. Reboot so onboarding runs. try: proc = await asyncio.create_subprocess_exec( - "/run/current-system/sw/bin/reboot", + "/run/current-system/sw/bin/systemctl", "start", "--no-block", REBOOT_UNIT, stdout=asyncio.subprocess.DEVNULL, stderr=asyncio.subprocess.DEVNULL, ) @@ -2885,7 +2886,7 @@ async def api_ping(): async def api_reboot(): try: proc = await asyncio.create_subprocess_exec( - "/run/current-system/sw/bin/reboot", + "/run/current-system/sw/bin/systemctl", "start", "--no-block", REBOOT_UNIT, stdout=asyncio.subprocess.DEVNULL, stderr=asyncio.subprocess.DEVNULL, ) diff --git a/modules/core/sovran-hub.nix b/modules/core/sovran-hub.nix index c7e70ba..3dff9c8 100644 --- a/modules/core/sovran-hub.nix +++ b/modules/core/sovran-hub.nix @@ -380,6 +380,14 @@ in }; }; + systemd.services.sovran-hub-reboot = { + description = "Sovran_SystemsOS System Reboot"; + serviceConfig = { + Type = "oneshot"; + ExecStart = "/run/current-system/sw/bin/systemctl --force reboot"; + }; + }; + environment.systemPackages = [ sovran-hub-web ]; networking.firewall.allowedTCPPorts = [ 8937 60847 ];