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

Commit

Permalink
libcontainer: use /run as root containers path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
marcov committed Dec 17, 2018
1 parent acb2a6f commit b9c5d5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type agentGRPC struct {
const (
cpuRegexpPattern = "cpu[0-9]*"
memRegexpPattern = "memory[0-9]*"
libcontainerPath = "/run/libcontainer"
)

var (
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b9c5d5b

Please # to comment.