提交 e9ecc593 编写于 作者: T Thomas Stromberg

logs: fallback to docker ps if crictl ps fails (none driver)

上级 3222c512
......@@ -165,6 +165,7 @@ func logCommands(r cruntime.Manager, bs bootstrapper.Bootstrapper, length int, f
}
cmds[r.Name()] = r.SystemLogCmd(length)
// Works across container runtimes with good formatting
cmds["container status"] = "sudo crictl ps -a"
// Fallback to 'docker ps' if it fails (none driver)
cmds["container status"] = "sudo crictl ps -a || sudo docker ps -a"
return cmds
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册