Browse Source

Merge pull request #21599 from tonistiigi/separate-daemon-exec-root

Use separate exec-root for test daemons
Alexander Morozov 9 years ago
parent
commit
d33480474f
2 changed files with 2 additions and 1 deletions
  1. 1 0
      integration-cli/daemon.go
  2. 1 1
      libcontainerd/remote_linux.go

+ 1 - 0
integration-cli/daemon.go

@@ -144,6 +144,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
 		d.Command,
 		d.Command,
 		"--containerd", "/var/run/docker/libcontainerd/docker-containerd.sock",
 		"--containerd", "/var/run/docker/libcontainerd/docker-containerd.sock",
 		"--graph", d.root,
 		"--graph", d.root,
+		"--exec-root", filepath.Join(d.folder, "exec-root"),
 		"--pidfile", fmt.Sprintf("%s/docker.pid", d.folder),
 		"--pidfile", fmt.Sprintf("%s/docker.pid", d.folder),
 		fmt.Sprintf("--userland-proxy=%t", d.userlandProxy),
 		fmt.Sprintf("--userland-proxy=%t", d.userlandProxy),
 	)
 	)

+ 1 - 1
libcontainerd/remote_linux.go

@@ -210,7 +210,7 @@ func (r *remote) getLastEventTimestamp() int64 {
 	t := time.Now()
 	t := time.Now()
 
 
 	fi, err := os.Stat(r.eventTsPath)
 	fi, err := os.Stat(r.eventTsPath)
-	if os.IsNotExist(err) {
+	if os.IsNotExist(err) || fi.Size() == 0 {
 		return t.Unix()
 		return t.Unix()
 	}
 	}