Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #105 from Netflix/revert-tmpfs
Browse files Browse the repository at this point in the history
Remove tmpfs at /run
  • Loading branch information
sargun committed May 8, 2018
2 parents e0508b3 + 64ed886 commit fb6d69f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
13 changes: 0 additions & 13 deletions executor/mock/standalone/standalone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func TestStandalone(t *testing.T) {
testFunctions := []func(*testing.T, string){
testSimpleJob,
testSimpleJobWithBadEnvironment,
testTmpfsAtRun,
testNoCapPtraceByDefault,
testCanAddCapabilities,
testDefaultCapabilities,
Expand Down Expand Up @@ -156,18 +155,6 @@ func testSimpleJobWithBadEnvironment(t *testing.T, jobID string) {
}
}

func testTmpfsAtRun(t *testing.T, jobID string) {
ji := &mock.JobInput{
ImageName: alpine.name,
Version: alpine.tag,
Entrypoint: "/bin/sh -c '/bin/df -m -T /run | grep tmpfs | grep 200'",
JobID: jobID,
}
if !mock.RunJobExpectingSuccess(ji, false) {
t.Fail()
}
}

func testNoCapPtraceByDefault(t *testing.T, jobID string) {
ji := &mock.JobInput{
ImageName: ubuntu.name,
Expand Down
15 changes: 0 additions & 15 deletions executor/runtime/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"github.com/aws/aws-sdk-go/aws/arn"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/mount"
docker "github.com/docker/docker/client"
"github.com/docker/go-units"
"github.com/ftrvxmtrx/fd"
Expand Down Expand Up @@ -422,20 +421,6 @@ func (r *DockerRuntime) dockerConfig(c *runtimeTypes.Container, binds []string,
"net.ipv6.conf.default.disable_ipv6": "0",
"net.ipv6.conf.lo.disable_ipv6": "0",
},
Mounts: []mount.Mount{
{
Type: mount.TypeTmpfs,
Target: "/run",
ReadOnly: false,
TmpfsOptions: &mount.TmpfsOptions{
// we set a size mostly so processes get ENOSPACE instead of being shot by the cgroup OOM killer
// 50% of the container memory limit by default to leave some room for other things, tmpfs mounts
// by default on most distros have a size that is half of the host memory
SizeBytes: (c.Resources.Mem / 2) * MiB,
Mode: 01777,
},
},
},
Init: &useInit,
}
hostCfg.CgroupParent = r.pidCgroupPath
Expand Down

0 comments on commit fb6d69f

Please sign in to comment.