소스 검색

Merge pull request #11295 from LK4D4/oom_after_dead

Check oom status after container stopped in lxc driver
Michael Crosby 10 년 전
부모
커밋
0c2eb5ebfb
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      daemon/execdriver/lxc/driver.go

+ 3 - 3
daemon/execdriver/lxc/driver.go

@@ -256,16 +256,16 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
 
 	oomKill := false
 	oomKillNotification, err := notifyOnOOM(cgroupPaths)
+
+	<-waitLock
+
 	if err == nil {
 		_, oomKill = <-oomKillNotification
 		log.Debugf("oomKill error %s waitErr %s", oomKill, waitErr)
-
 	} else {
 		log.Warnf("Your kernel does not support OOM notifications: %s", err)
 	}
 
-	<-waitLock
-
 	// check oom error
 	exitCode := getExitCode(c)
 	if oomKill {