summaryrefslogtreecommitdiff
path: root/libpod/container_easyjson.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-10-15 15:42:12 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2018-10-15 16:19:11 -0400
commit57a8c2e5e844ee403c9a703c621780de7c7343f0 (patch)
tree20a2acfd315cdfcc1f472c18508cd53b1dfedc47 /libpod/container_easyjson.go
parent2bc9a3c4bbaade50264b1dbf348d1521cdd8d8b5 (diff)
downloadpodman-57a8c2e5e844ee403c9a703c621780de7c7343f0.tar.gz
podman-57a8c2e5e844ee403c9a703c621780de7c7343f0.tar.bz2
podman-57a8c2e5e844ee403c9a703c621780de7c7343f0.zip
Mount proper cgroup for systemd to manage inside of the container.
We are still requiring oci-systemd-hook to be installed in order to run systemd within a container. This patch properly mounts /sys/fs/cgroup/systemd/libpod_parent/libpod-UUID on /sys/fs/cgroup/systemd inside of container. Since we need the UUID of the container, we needed to move Systemd to be a config option of the container. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/container_easyjson.go')
-rw-r--r--libpod/container_easyjson.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpod/container_easyjson.go b/libpod/container_easyjson.go
index f78366065..53ad5b7ee 100644
--- a/libpod/container_easyjson.go
+++ b/libpod/container_easyjson.go
@@ -1682,6 +1682,8 @@ func easyjson1dbef17bDecodeGithubComContainersLibpodLibpod2(in *jlexer.Lexer, ou
}
case "pause":
out.IsInfra = bool(in.Bool())
+ case "systemd":
+ out.Systemd = bool(in.Bool())
default:
in.SkipRecursive()
}
@@ -2344,6 +2346,16 @@ func easyjson1dbef17bEncodeGithubComContainersLibpodLibpod2(out *jwriter.Writer,
}
out.Bool(bool(in.IsInfra))
}
+ {
+ const prefix string = ",\"systemd\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ out.Bool(bool(in.Systemd))
+ }
out.RawByte('}')
}