Skip to content

Commit

Permalink
Merge pull request google#2946 from qiutongs/containerd-fix
Browse files Browse the repository at this point in the history
Prepend rootfs to the paths in containerd handler
  • Loading branch information
bobbypage authored Sep 29, 2021
2 parents dcd18fa + 6704378 commit 0c950e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions container/containerd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package containerd
import (
"encoding/json"
"fmt"
"path"
"strings"
"time"

Expand Down Expand Up @@ -192,7 +193,7 @@ func newContainerdContainerHandler(
}
}
}
deviceInfo, err := fsInfo.GetDirFsDevice(snapshotDir)
deviceInfo, err := fsInfo.GetDirFsDevice(path.Join(rootfs, snapshotDir))
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -227,7 +228,7 @@ func newContainerdContainerHandler(
client: client,
containerID: id,
// Path of logs, e.g. /var/log/pods/XXX
logPath: status.LogPath,
logPath: path.Join(rootfs, status.LogPath),
fsInfo: fsInfo,
})
}
Expand Down

0 comments on commit 0c950e5

Please sign in to comment.