summaryrefslogtreecommitdiff
path: root/libcontainerd
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2019-05-22 13:27:55 +0200
committerSebastiaan van Stijn <github@gone.nl>2019-09-16 14:47:21 +0200
commita6b8e81332463ab0fff62a0ea0e9717f63d022dd (patch)
treeffd9b0271f2e9151ce514a53197223775f33a925 /libcontainerd
parent6ffb8e2b6727077d833ce4824830d0d0535eb4df (diff)
downloaddocker-a6b8e81332463ab0fff62a0ea0e9717f63d022dd.tar.gz
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 <github@gone.nl> (cherry picked from commit c030885e7afef7ef14ba8709837a4a4e8e2127d8) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'libcontainerd')
-rw-r--r--libcontainerd/local/local_windows.go2
1 files changed, 1 insertions, 1 deletions
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)