소스 검색

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>
Sebastiaan van Stijn 6 년 전
부모
커밋
c030885e7a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      libcontainerd/local/local_windows.go

+ 1 - 1
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)