mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
ab48ead095
* fix: exit non-zero when a spinifex service fails to start Every service start/stop subcommand in cmd/spinifex/cmd/service.go used Run funcs that printed an error and returned, which exits 0. Systemd's Restart=on-failure never fires on a zero exit, so a fatal startup error (seen live: viperblockd's volume lease bucket lookup timing out during a cold JetStream start) left the node permanently down until a manual systemctl restart. Converts every fatal error path across predastore, viperblock, qemunbd, nats, spinifex, awsgw, spinifex-ui, vpcd, northstar and qmp-collector to RunE returning an error, following the RunE + SilenceErrors/SilenceUsage pattern the northstar start command already used in this file. root.go's Execute() already prints the returned error to stderr and calls os.Exit(1), so this centralizes the exit-code decision instead of repeating fmt.Fprintln+os.Exit at each call site. Pure status subcommands with no fallible operations are left as Run. Adds a subprocess re-exec test proving a fatal predastore start now exits 1 end to end, plus in-process RunE tests covering each service's start command. * test: cover the service startup validation branches