Logging driver should receive same file in start/stop request

Signed-off-by: Peter Bücker <peter.buecker@gmail.com>
Upstream-commit: e908e1a357b435d7fab497d51cdd3e58458a0590
Component: engine
This commit is contained in:
Peter Bücker
2017-06-08 10:05:52 +02:00
parent 042ba9639d
commit a53424fe86
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -3,6 +3,7 @@ package logger
import (
"io"
"os"
"strings"
"sync"
"time"
@@ -18,6 +19,7 @@ type pluginAdapter struct {
driverName string
id string
plugin logPlugin
basePath string
fifoPath string
capabilities Capability
logInfo Info
@@ -56,7 +58,7 @@ func (a *pluginAdapter) Close() error {
a.mu.Lock()
defer a.mu.Unlock()
if err := a.plugin.StopLogging(a.fifoPath); err != nil {
if err := a.plugin.StopLogging(strings.TrimPrefix(a.fifoPath, a.basePath)); err != nil {
return err
}
@@ -59,6 +59,7 @@ func makePluginCreator(name string, l *logPluginProxy, basePath string) Creator
driverName: name,
id: id,
plugin: l,
basePath: basePath,
fifoPath: filepath.Join(root, id),
logInfo: logCtx,
}