From bb98418ac9a24f3e52d2edf36bb8ccb465177ab4 Mon Sep 17 00:00:00 2001 From: anonpenguin23 Date: Thu, 19 Feb 2026 06:43:28 +0200 Subject: [PATCH] Unmask and re-enable services before restarting to ensure proper startup --- pkg/cli/production/upgrade/orchestrator.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkg/cli/production/upgrade/orchestrator.go b/pkg/cli/production/upgrade/orchestrator.go index 29e148f..73e4cec 100644 --- a/pkg/cli/production/upgrade/orchestrator.go +++ b/pkg/cli/production/upgrade/orchestrator.go @@ -635,11 +635,16 @@ func (o *Orchestrator) restartServices() error { // Get services to restart services := utils.GetProductionServices() - // Re-enable all services BEFORE restarting them. - // orama node stop disables services, and orama-node's PartOf= dependency - // won't propagate restart to disabled services. We must re-enable first - // so that all services restart with the updated binary. + // Unmask and re-enable all services BEFORE restarting them. + // "orama node stop" masks services (symlinks unit to /dev/null) to prevent + // Restart=always from reviving them. We must unmask first, then re-enable, + // so that all services (including namespace services) can actually start. for _, svc := range services { + if masked, err := utils.IsServiceMasked(svc); err == nil && masked { + if err := exec.Command("systemctl", "unmask", svc).Run(); err != nil { + fmt.Printf(" ⚠️ Warning: Failed to unmask %s: %v\n", svc, err) + } + } if err := exec.Command("systemctl", "enable", svc).Run(); err != nil { fmt.Printf(" ⚠️ Warning: Failed to re-enable %s: %v\n", svc, err) }