Skip to content

Commit 5eab56e

Browse files
committed
Pass cgroup manager to oci runtime manager
Signed-off-by: Mrunal Patel <[email protected]>
1 parent edad8f8 commit 5eab56e

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

oci/oci.go

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,26 @@ const (
3434
)
3535

3636
// New creates a new Runtime with options provided
37-
func New(runtimePath string, containerDir string, conmonPath string, conmonEnv []string) (*Runtime, error) {
37+
func New(runtimePath string, containerDir string, conmonPath string, conmonEnv []string, cgroupManager string) (*Runtime, error) {
3838
r := &Runtime{
39-
name: filepath.Base(runtimePath),
40-
path: runtimePath,
41-
containerDir: containerDir,
42-
conmonPath: conmonPath,
43-
conmonEnv: conmonEnv,
39+
name: filepath.Base(runtimePath),
40+
path: runtimePath,
41+
containerDir: containerDir,
42+
conmonPath: conmonPath,
43+
conmonEnv: conmonEnv,
44+
cgroupManager: cgroupManager,
4445
}
4546
return r, nil
4647
}
4748

4849
// Runtime stores the information about a oci runtime
4950
type Runtime struct {
50-
name string
51-
path string
52-
containerDir string
53-
conmonPath string
54-
conmonEnv []string
51+
name string
52+
path string
53+
containerDir string
54+
conmonPath string
55+
conmonEnv []string
56+
cgroupManager string
5557
}
5658

5759
// syncInfo is used to return data from monitor process to daemon

server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func New(config *Config) (*Server, error) {
304304
return nil, err
305305
}
306306

307-
r, err := oci.New(config.Runtime, config.ContainerDir, config.Conmon, config.ConmonEnv)
307+
r, err := oci.New(config.Runtime, config.ContainerDir, config.Conmon, config.ConmonEnv, config.CgroupManager)
308308
if err != nil {
309309
return nil, err
310310
}

0 commit comments

Comments
 (0)