From b9c5d5b2235333711177ff1c0b25fe89028563e5 Mon Sep 17 00:00:00 2001 From: Marco Vedovati Date: Fri, 14 Dec 2018 10:32:38 +0100 Subject: [PATCH] libcontainer: use /run as root containers path Use /run/libcontainer as root path for container factory, as /tmp may be read only for some configuration / architectures. Fixes: #435 Signed-off-by: Marco Vedovati --- grpc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grpc.go b/grpc.go index ee91c5e9db..50f793b75e 100644 --- a/grpc.go +++ b/grpc.go @@ -45,6 +45,7 @@ type agentGRPC struct { const ( cpuRegexpPattern = "cpu[0-9]*" memRegexpPattern = "memory[0-9]*" + libcontainerPath = "/run/libcontainer" ) var ( @@ -539,7 +540,7 @@ func (a *agentGRPC) rollbackFailingContainerCreation(ctr *container) { } func (a *agentGRPC) finishCreateContainer(ctr *container, req *pb.CreateContainerRequest, config *configs.Config) (resp *gpb.Empty, err error) { - containerPath := filepath.Join("/tmp/libcontainer", a.sandbox.id) + containerPath := filepath.Join(libcontainerPath, a.sandbox.id) factory, err := libcontainer.New(containerPath, libcontainer.Cgroupfs) if err != nil { return emptyResp, err