From 5eab56e002f7c33f6e9f34b394df234e6c7e320c Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Mon, 19 Dec 2016 15:05:32 -0800 Subject: [PATCH] Pass cgroup manager to oci runtime manager Signed-off-by: Mrunal Patel --- oci/oci.go | 24 +++++++++++++----------- server/server.go | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/oci/oci.go b/oci/oci.go index ba7dada4..21d00220 100644 --- a/oci/oci.go +++ b/oci/oci.go @@ -34,24 +34,26 @@ const ( ) // New creates a new Runtime with options provided -func New(runtimePath string, containerDir string, conmonPath string, conmonEnv []string) (*Runtime, error) { +func New(runtimePath string, containerDir string, conmonPath string, conmonEnv []string, cgroupManager string) (*Runtime, error) { r := &Runtime{ - name: filepath.Base(runtimePath), - path: runtimePath, - containerDir: containerDir, - conmonPath: conmonPath, - conmonEnv: conmonEnv, + name: filepath.Base(runtimePath), + path: runtimePath, + containerDir: containerDir, + conmonPath: conmonPath, + conmonEnv: conmonEnv, + cgroupManager: cgroupManager, } return r, nil } // Runtime stores the information about a oci runtime type Runtime struct { - name string - path string - containerDir string - conmonPath string - conmonEnv []string + name string + path string + containerDir string + conmonPath string + conmonEnv []string + cgroupManager string } // syncInfo is used to return data from monitor process to daemon diff --git a/server/server.go b/server/server.go index 8f1ae391..cfa2e8e0 100644 --- a/server/server.go +++ b/server/server.go @@ -304,7 +304,7 @@ func New(config *Config) (*Server, error) { return nil, err } - r, err := oci.New(config.Runtime, config.ContainerDir, config.Conmon, config.ConmonEnv) + r, err := oci.New(config.Runtime, config.ContainerDir, config.Conmon, config.ConmonEnv, config.CgroupManager) if err != nil { return nil, err }