oci: Add log size max to container

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2017-09-25 15:28:29 -07:00
parent c7f5347673
commit bb11ee522b
2 changed files with 4 additions and 2 deletions

View file

@ -121,7 +121,7 @@ func New(config *Config) (*ContainerServer, error) {
return nil, err return nil, err
} }
runtime, err := oci.New(config.Runtime, config.RuntimeUntrustedWorkload, config.DefaultWorkloadTrust, config.Conmon, config.ConmonEnv, config.CgroupManager, config.ContainerExitsDir) runtime, err := oci.New(config.Runtime, config.RuntimeUntrustedWorkload, config.DefaultWorkloadTrust, config.Conmon, config.ConmonEnv, config.CgroupManager, config.ContainerExitsDir, config.LogSizeMax)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View file

@ -38,7 +38,7 @@ const (
) )
// New creates a new Runtime with options provided // New creates a new Runtime with options provided
func New(runtimeTrustedPath string, runtimeUntrustedPath string, trustLevel string, conmonPath string, conmonEnv []string, cgroupManager string, containerExitsDir string) (*Runtime, error) { func New(runtimeTrustedPath string, runtimeUntrustedPath string, trustLevel string, conmonPath string, conmonEnv []string, cgroupManager string, containerExitsDir string, logSizeMax int64) (*Runtime, error) {
r := &Runtime{ r := &Runtime{
name: filepath.Base(runtimeTrustedPath), name: filepath.Base(runtimeTrustedPath),
trustedPath: runtimeTrustedPath, trustedPath: runtimeTrustedPath,
@ -48,6 +48,7 @@ func New(runtimeTrustedPath string, runtimeUntrustedPath string, trustLevel stri
conmonEnv: conmonEnv, conmonEnv: conmonEnv,
cgroupManager: cgroupManager, cgroupManager: cgroupManager,
containerExitsDir: containerExitsDir, containerExitsDir: containerExitsDir,
logSizeMax: logSizeMax,
} }
return r, nil return r, nil
} }
@ -62,6 +63,7 @@ type Runtime struct {
conmonEnv []string conmonEnv []string
cgroupManager string cgroupManager string
containerExitsDir string containerExitsDir string
logSizeMax int64
} }
// syncInfo is used to return data from monitor process to daemon // syncInfo is used to return data from monitor process to daemon