From 7c9067cc9d22c424c37b2310171e0ad00349706d Mon Sep 17 00:00:00 2001 From: bin Date: Sun, 25 Apr 2021 15:26:09 +0800 Subject: [PATCH] docs: add per-Pod Kata configurations for enable_pprof MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now enabling enable_pprof for individual pods is supported, but not documented. This commit will add per-Pod Kata configurations for `enable_pprof` in file `docs/how-to/how-to-set-sandbox-config-kata.md` Fixes: #1744 Signed-off-by: bin (cherry picked from commit 95e54e3f4892f90bc9e86337ae7766f76076babd) Signed-off-by: Fabiano FidĂȘncio --- docs/how-to/how-to-set-sandbox-config-kata.md | 1 + src/runtime/containerd-shim-v2/shim_management.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/how-to/how-to-set-sandbox-config-kata.md b/docs/how-to/how-to-set-sandbox-config-kata.md index c2e518baa..d530a0c5e 100644 --- a/docs/how-to/how-to-set-sandbox-config-kata.md +++ b/docs/how-to/how-to-set-sandbox-config-kata.md @@ -26,6 +26,7 @@ There are several kinds of Kata configurations and they are listed below. | `io.katacontainers.config.runtime.disable_new_netns` | `boolean` | determines if a new netns is created for the hypervisor process | | `io.katacontainers.config.runtime.internetworking_model` | string| determines how the VM should be connected to the container network interface. Valid values are `macvtap`, `tcfilter` and `none` | | `io.katacontainers.config.runtime.sandbox_cgroup_only`| `boolean` | determines if Kata processes are managed only in sandbox cgroup | +| `io.katacontainers.config.runtime.enable_pprof` | `boolean` | enables Golang `pprof` for `containerd-shim-kata-v2` process | ## Agent Options | Key | Value Type | Comments | diff --git a/src/runtime/containerd-shim-v2/shim_management.go b/src/runtime/containerd-shim-v2/shim_management.go index e03224f07..d7b4bb1ca 100644 --- a/src/runtime/containerd-shim-v2/shim_management.go +++ b/src/runtime/containerd-shim-v2/shim_management.go @@ -166,7 +166,7 @@ func (s *service) startManagementServer(ctx context.Context, ociSpec *specs.Spec svr.Serve(listener) } -// mountServeDebug provides a debug endpoint +// mountPprofHandle provides a debug endpoint func (s *service) mountPprofHandle(m *http.ServeMux, ociSpec *specs.Spec) { // return if not enabled