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

libcontainer: use /run as root containers path #436

Merged
merged 1 commit into from
Dec 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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