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

Commit 29f3fe9

Browse files
author
Julio Montes
authored
Merge pull request #436 from marcov/libcontainer-tmp
libcontainer: use /run as root containers path
2 parents acb2a6f + b9c5d5b commit 29f3fe9

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)