浏览代码

Merge pull request #25777 from swernli/servicing_race

Fixing race in Windows container servicing
Brian Goff 8 年之前
父节点
当前提交
4219c0018f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      libcontainerd/container_windows.go

+ 2 - 2
libcontainerd/container_windows.go

@@ -95,7 +95,7 @@ func (ctr *container) start() error {
 	ctr.process.hcsProcess = hcsProcess
 
 	// If this is a servicing container, wait on the process synchronously here and
-	// immediately call shutdown/terminate when it returns.
+	// if it succeeds, wait for it cleanly shutdown and merge into the parent container.
 	if isServicing {
 		exitCode := ctr.waitProcessExitCode(&ctr.process)
 
@@ -104,7 +104,7 @@ func (ctr *container) start() error {
 			return ctr.terminate()
 		}
 
-		return ctr.shutdown()
+		return ctr.hcsContainer.WaitTimeout(time.Minute * 5)
 	}
 
 	var stdout, stderr io.ReadCloser