From a6b8e81332463ab0fff62a0ea0e9717f63d022dd Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 22 May 2019 13:27:55 +0200 Subject: [PATCH] Windows: fix error-type for starting a running container Trying to start a container that is already running is not an error condition, so a `304 Not Modified` should be returned instead of a `409 Conflict`. Signed-off-by: Sebastiaan van Stijn (cherry picked from commit c030885e7afef7ef14ba8709837a4a4e8e2127d8) Signed-off-by: Sebastiaan van Stijn --- libcontainerd/local/local_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainerd/local/local_windows.go b/libcontainerd/local/local_windows.go index 95c41b445d..83c356c75d 100644 --- a/libcontainerd/local/local_windows.go +++ b/libcontainerd/local/local_windows.go @@ -607,7 +607,7 @@ func (c *client) Start(_ context.Context, id, _ string, withStdin bool, attachSt case ctr == nil: return -1, errors.WithStack(errdefs.NotFound(errors.New("no such container"))) case ctr.init != nil: - return -1, errors.WithStack(errdefs.Conflict(errors.New("container already started"))) + return -1, errors.WithStack(errdefs.NotModified(errors.New("container already started"))) } logger := c.logger.WithField("container", id)