runtime: Don't create socket file in /run/kata

The socket file for shim management is created in /run/kata
and it isn't deleted after the container is stopped. After
running and stopping thousands of containers /run folder
will run out of space.

Fixes #6622
Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
Co-authored-by: Greg Kurz <groug@kaod.org>
This commit is contained in:
Alexandru Matei
2023-04-06 14:00:27 +03:00
parent 328793bb27
commit db2cac34d8
3 changed files with 31 additions and 7 deletions

View File

@@ -19,7 +19,7 @@ import (
// 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)
return buildUnixSocketClient(shim.ClientSocketAddress(sandboxID), timeout)
}
// buildUnixSocketClient build http client for Unix socket