浏览代码

Revert "libcontainerd: work around exec start bug in c8d"

The workaround is no longer required. The bug has been fixed in stable
versions of all supported containerd branches.

This reverts commit fb7ec1555cca750f5d1d99bae5e99b4818712322.

Signed-off-by: Cory Snider <csnider@mirantis.com>
Cory Snider 1 年之前
父节点
当前提交
29ac09ee9d
共有 1 个文件被更改,包括 1 次插入10 次删除
  1. 1 10
      libcontainerd/remote/client.go

+ 1 - 10
libcontainerd/remote/client.go

@@ -62,10 +62,6 @@ type container struct {
 type task struct {
 	containerd.Task
 	ctr *container
-
-	// Workaround for https://github.com/containerd/containerd/issues/8557.
-	// See also https://github.com/moby/moby/issues/45595.
-	serializeExecStartsWorkaround sync.Mutex
 }
 
 type process struct {
@@ -302,12 +298,7 @@ func (t *task) Exec(ctx context.Context, processID string, spec *specs.Process,
 	// the stdin of exec process will be created after p.Start in containerd
 	defer func() { stdinCloseSync <- p }()
 
-	err = func() error {
-		t.serializeExecStartsWorkaround.Lock()
-		defer t.serializeExecStartsWorkaround.Unlock()
-		return p.Start(ctx)
-	}()
-	if err != nil {
+	if err = p.Start(ctx); err != nil {
 		// use new context for cleanup because old one may be cancelled by user, but leave a timeout to make sure
 		// we are not waiting forever if containerd is unresponsive or to work around fifo cancelling issues in
 		// older containerd-shim