cmd/dockerd: daemonCLI.start: return error instead of log.Fatal

We return errors in this function, except for this one, which was logged
as Fatal. If we want errors to be logged, we should probably do so in
the function calling daemonCLI.start.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-03-07 00:15:16 +01:00
parent 8a8cdaaa11
commit 8b59e1a398

View File

@@ -281,7 +281,7 @@ func (cli *daemonCLI) start(ctx context.Context) (err error) {
c, err := createAndStartCluster(d, cli.Config)
if err != nil {
log.G(ctx).WithError(err).Fatalf("Error starting cluster component")
return fmt.Errorf("failed to start cluster component: %w", err)
}
// Restart all autostart containers which has a swarm endpoint