Add support for gVisor logging
Test Plan: Started Container using `bazel run //core/cmd/dbg -- kubectl run -i busybox --image=busybox test`, then observed logs using `bazel run //core/cmd/dbg logs containerd.runsc`
X-Origin-Diff: phab/D527
GitOrigin-RevId: 10dfa1704cbc18becc2005e7b38cc881e6ec50b5
diff --git a/core/internal/node/debug.go b/core/internal/node/debug.go
index 1d91ad6..2ed3896 100644
--- a/core/internal/node/debug.go
+++ b/core/internal/node/debug.go
@@ -49,7 +49,11 @@
var err error
switch req.ComponentPath[0] {
case "containerd":
- lines = s.Containerd.Log.ReadLinesTruncated(linesToRead, "...")
+ if len(req.ComponentPath) < 2 {
+ lines = s.Containerd.Log.ReadLinesTruncated(linesToRead, "...")
+ } else if req.ComponentPath[1] == "runsc" {
+ lines = s.Containerd.RunscLog.ReadLinesTruncated(linesToRead, "...")
+ }
case "kube":
if len(req.ComponentPath) < 2 {
return nil, status.Error(codes.NotFound, "Component not found")