m/n/core: always start network service
Fix logic bug causing the network service not to be started when
static network config is in use.
We really need tests for this.
Change-Id: I8ae29809ee453891f0781aa4e1b9f7a160610bff
Reviewed-on: https://review.monogon.dev/c/monogon/+/1643
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/metropolis/node/core/main.go b/metropolis/node/core/main.go
index 715a7ac..13d735f 100644
--- a/metropolis/node/core/main.go
+++ b/metropolis/node/core/main.go
@@ -160,9 +160,9 @@
} else {
logger.Errorf("Unable to load static config, proceeding without it: %v", err)
}
- if err := supervisor.Run(ctx, "network", networkSvc.Run); err != nil {
- return fmt.Errorf("when starting network: %w", err)
- }
+ }
+ if err := supervisor.Run(ctx, "network", networkSvc.Run); err != nil {
+ return fmt.Errorf("when starting network: %w", err)
}
if err := supervisor.Run(ctx, "time", timeSvc.Run); err != nil {
return fmt.Errorf("when starting time: %w", err)