From 853c5c41f1a0f65815674cce0777a20de24c8309 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 21 Mar 2018 12:19:26 -0400 Subject: Add --cgroup-manager flag to Podman binary Signed-off-by: Matthew Heon Closes: #507 Approved by: baude --- cmd/podman/libpodruntime/runtime.go | 5 ++++- cmd/podman/main.go | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go index d1657325d..ea626ed8e 100644 --- a/cmd/podman/libpodruntime/runtime.go +++ b/cmd/podman/libpodruntime/runtime.go @@ -42,7 +42,10 @@ func GetRuntimeWithStorageOpts(c *cli.Context, storageOpts *storage.StoreOptions options = append(options, libpod.WithConmonPath(c.GlobalString("conmon"))) } - // TODO flag to set CGroup manager? + if c.GlobalIsSet("cgroup-manager") { + options = append(options, libpod.WithCgroupManager(c.GlobalString("cgroup-manager"))) + } + // TODO flag to set libpod static dir? // TODO flag to set libpod tmp dir? diff --git a/cmd/podman/main.go b/cmd/podman/main.go index aefde3b93..c928037e3 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -108,6 +108,10 @@ func main() { return nil } app.Flags = []cli.Flag{ + cli.StringFlag{ + Name: "cgroup-manager", + Usage: "cgroup manager to use (cgroupfs or systemd, default cgroupfs)", + }, cli.StringFlag{ Name: "cni-config-dir", Usage: "path of the configuration directory for CNI networks", -- cgit v1.2.3-54-g00ecf