Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit b9c5d5b

Browse files
committed
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 <mvedovati@suse.com>
1 parent acb2a6f commit b9c5d5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

grpc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ type agentGRPC struct {
4545
const (
4646
cpuRegexpPattern = "cpu[0-9]*"
4747
memRegexpPattern = "memory[0-9]*"
48+
libcontainerPath = "/run/libcontainer"
4849
)
4950

5051
var (
@@ -539,7 +540,7 @@ func (a *agentGRPC) rollbackFailingContainerCreation(ctr *container) {
539540
}
540541

541542
func (a *agentGRPC) finishCreateContainer(ctr *container, req *pb.CreateContainerRequest, config *configs.Config) (resp *gpb.Empty, err error) {
542-
containerPath := filepath.Join("/tmp/libcontainer", a.sandbox.id)
543+
containerPath := filepath.Join(libcontainerPath, a.sandbox.id)
543544
factory, err := libcontainer.New(containerPath, libcontainer.Cgroupfs)
544545
if err != nil {
545546
return emptyResp, err

0 commit comments

Comments
 (0)