Change default subreaper setting

This subreaper should always be turned on for containerd unless
explicitly needed for it to be off.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2017-11-28 17:04:21 -05:00
parent 967caeeacc
commit 6e9f24b711
3 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ func defaultConfig() *server.Config {
GRPC: server.GRPCConfig{
Address: defaults.DefaultAddress,
},
Subreaper: true,
NoSubreaper: false,
Debug: server.Debug{
Level: "info",
Address: defaults.DefaultDebugAddress,

View File

@ -23,8 +23,8 @@ type Config struct {
Metrics MetricsConfig `toml:"metrics"`
// Plugins provides plugin specific configuration for the initialization of a plugin
Plugins map[string]toml.Primitive `toml:"plugins"`
// Enable containerd as a subreaper
Subreaper bool `toml:"subreaper"`
// NoSubreaper disables containerd as a subreaper
NoSubreaper bool `toml:"no_subreaper"`
// OOMScore adjust the containerd's oom score
OOMScore int `toml:"oom_score"`
// Cgroup specifies cgroup information for the containerd daemon process

View File

@ -12,7 +12,7 @@ import (
// apply sets config settings on the server process
func apply(ctx context.Context, config *Config) error {
if config.Subreaper {
if !config.NoSubreaper {
log.G(ctx).Info("setting subreaper...")
if err := sys.SetSubreaper(1); err != nil {
return err