From 30d07d4407262092d0937d36fe0f6d489ea7ed7a Mon Sep 17 00:00:00 2001 From: Francesco Giudici Date: Tue, 14 Sep 2021 16:52:39 +0200 Subject: [PATCH] kata-monitor: add getSandboxFS() Retrieve the absolute sandbox storage path. We will soon need this to monitor the creation/deletion of new kata sandboxes. Signed-off-by: Francesco Giudici (cherry picked from commit afad910d0e7ddfc04f56348a535349902b6dafd4) --- src/runtime/pkg/kata-monitor/shim_client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runtime/pkg/kata-monitor/shim_client.go b/src/runtime/pkg/kata-monitor/shim_client.go index 31d014e09..178a2e629 100644 --- a/src/runtime/pkg/kata-monitor/shim_client.go +++ b/src/runtime/pkg/kata-monitor/shim_client.go @@ -36,6 +36,10 @@ func getSandboxIDFromReq(r *http.Request) (string, error) { return "", fmt.Errorf("sandbox not found in %+v", r.URL.Query()) } +func getSandboxFS() string { + return shim.GetSanboxesStoragePath() +} + // BuildShimClient builds and returns an http client for communicating with the provided sandbox func BuildShimClient(sandboxID string, timeout time.Duration) (*http.Client, error) { return buildUnixSocketClient(shim.SocketAddress(sandboxID), timeout)