Merge pull request #1557 from rhatdan/systemd

Don't tmpcopyup on systemd cgroup
This commit is contained in:
OpenShift Merge Robot 2018-10-04 09:54:51 -07:00 committed by GitHub
commit 3c31e176c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -417,7 +417,7 @@ func setupSystemd(config *CreateConfig, g *generate.Generator) error {
return err
}
options := []string{"rw", "rprivate", "noexec", "nosuid", "nodev"}
for _, dest := range []string{"/run", "/run/lock", "/sys/fs/cgroup/systemd"} {
for _, dest := range []string{"/run", "/run/lock"} {
if libpod.MountExists(mounts, dest) {
continue
}
@ -441,6 +441,13 @@ func setupSystemd(config *CreateConfig, g *generate.Generator) error {
}
g.AddMount(tmpfsMnt)
}
tmpfsMnt := spec.Mount{
Destination: "/sys/fs/cgroup/systemd",
Type: "tmpfs",
Source: "tmpfs",
Options: append(options, "size=65536k"),
}
g.AddMount(tmpfsMnt)
return nil
}