Skip to content

Commit 6b22b5c

Browse files
qiutongsbobbypage
authored andcommitted
Prepend rootfs to the paths in containerd handler
Signed-off-by: Qiutong Song <[email protected]>
1 parent 8ae4550 commit 6b22b5c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

container/containerd/handler.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package containerd
1818
import (
1919
"encoding/json"
2020
"fmt"
21+
"path"
2122
"strings"
2223
"time"
2324

@@ -192,7 +193,7 @@ func newContainerdContainerHandler(
192193
}
193194
}
194195
}
195-
deviceInfo, err := fsInfo.GetDirFsDevice(snapshotDir)
196+
deviceInfo, err := fsInfo.GetDirFsDevice(path.Join(rootfs, snapshotDir))
196197
if err != nil {
197198
return nil, err
198199
}
@@ -227,7 +228,7 @@ func newContainerdContainerHandler(
227228
client: client,
228229
containerID: id,
229230
// Path of logs, e.g. /var/log/pods/XXX
230-
logPath: status.LogPath,
231+
logPath: path.Join(rootfs, status.LogPath),
231232
fsInfo: fsInfo,
232233
})
233234
}

0 commit comments

Comments
 (0)