Browse code

Use separate exec-root for test daemons

Fixes #21545

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 0d9b94c4c5d6b4f03a7a86e731e4110e9f27a51e)

Tonis Tiigi authored on 2016/03/29 09:33:09
Showing 2 changed files
... ...
@@ -144,6 +144,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
144 144
 		d.Command,
145 145
 		"--containerd", "/var/run/docker/libcontainerd/docker-containerd.sock",
146 146
 		"--graph", d.root,
147
+		"--exec-root", filepath.Join(d.folder, "exec-root"),
147 148
 		"--pidfile", fmt.Sprintf("%s/docker.pid", d.folder),
148 149
 		fmt.Sprintf("--userland-proxy=%t", d.userlandProxy),
149 150
 	)
... ...
@@ -210,7 +210,7 @@ func (r *remote) getLastEventTimestamp() int64 {
210 210
 	t := time.Now()
211 211
 
212 212
 	fi, err := os.Stat(r.eventTsPath)
213
-	if os.IsNotExist(err) {
213
+	if os.IsNotExist(err) || fi.Size() == 0 {
214 214
 		return t.Unix()
215 215
 	}
216 216