Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 6bceecd

Browse files
committed
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> Upstream-commit: a6b8e81332463ab0fff62a0ea0e9717f63d022dd Component: engine
1 parent a5906db commit 6bceecd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/engine/libcontainerd/local/local_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ func (c *client) Start(_ context.Context, id, _ string, withStdin bool, attachSt
607607
case ctr == nil:
608608
return -1, errors.WithStack(errdefs.NotFound(errors.New("no such container")))
609609
case ctr.init != nil:
610-
return -1, errors.WithStack(errdefs.Conflict(errors.New("container already started")))
610+
return -1, errors.WithStack(errdefs.NotModified(errors.New("container already started")))
611611
}
612612

613613
logger := c.logger.WithField("container", id)

0 commit comments

Comments
 (0)