daemon: translateContainerdStartErr(): rename to setExitCodeFromError()

This should hopefully make it slightly clearer what it does.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-08-24 12:44:05 +02:00
parent 83dd99177f
commit 42f1be8030
4 changed files with 7 additions and 7 deletions

View File

@@ -179,7 +179,7 @@ func (daemon *Daemon) containerStart(ctx context.Context, container *container.C
ctr, err := libcontainerd.ReplaceContainer(ctx, daemon.containerd, container.ID, spec, shim, createOptions)
if err != nil {
return translateContainerdStartErr(container.SetExitCode, err)
return setExitCodeFromError(container.SetExitCode, err)
}
// TODO(mlaventure): we need to specify checkpoint options here
@@ -191,7 +191,7 @@ func (daemon *Daemon) containerStart(ctx context.Context, container *container.C
logrus.WithError(err).WithField("container", container.ID).
Error("failed to delete failed start container")
}
return translateContainerdStartErr(container.SetExitCode, err)
return setExitCodeFromError(container.SetExitCode, err)
}
container.HasBeenManuallyRestarted = false