mirror of
https://github.com/containers/podman.git
synced 2025-06-23 10:38:20 +08:00
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>
This commit is contained in:
@ -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('}')
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user