diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-06-20 13:30:39 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-06-20 13:31:31 -0700 |
commit | 4ad7315b6759afa81f492ec119080deb9a224101 (patch) | |
tree | 0f1e4c51b199301023f0269855013e020cc54ea2 /runsc/boot/controller.go | |
parent | 5aa7615ec93335a922361728881ab1224a6e9266 (diff) |
Add 'runsc debug' command
It prints sandbox stacks to the log to help debug stuckness. I expect
that many more options will be added in the future.
PiperOrigin-RevId: 201405931
Change-Id: I87e560800cd5a5a7b210dc25a5661363c8c3a16e
Diffstat (limited to 'runsc/boot/controller.go')
-rw-r--r-- | runsc/boot/controller.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runsc/boot/controller.go b/runsc/boot/controller.go index 1a598199d..ec24c4dad 100644 --- a/runsc/boot/controller.go +++ b/runsc/boot/controller.go @@ -68,6 +68,9 @@ const ( // RootContainerStart is the URPC endpoint for starting a new sandbox // with root container. RootContainerStart = "containerManager.StartRoot" + + // SandboxStacks collects sandbox stacks for debugging. + SandboxStacks = "debug.Stacks" ) // ControlSocketAddr generates an abstract unix socket name for the given id. @@ -107,6 +110,8 @@ func newController(fd int, k *kernel.Kernel, w *watchdog.Watchdog) (*controller, srv.Register(net) } + srv.Register(&debug{}) + if err := srv.StartServing(); err != nil { return nil, err } |