Remove reaper from containerd daemon
This allows other packages and plugins to easily exec things without racing with the reaper. The reaper is mostly needed in the shim but can be removed in containerd in favor of the `exec.Cmd` apis Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -23,8 +23,6 @@ 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"`
|
||||
// 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
|
||||
|
||||
@@ -12,12 +12,6 @@ import (
|
||||
|
||||
// apply sets config settings on the server process
|
||||
func apply(ctx context.Context, config *Config) error {
|
||||
if !config.NoSubreaper {
|
||||
log.G(ctx).Info("setting subreaper...")
|
||||
if err := sys.SetSubreaper(1); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if config.OOMScore != 0 {
|
||||
log.G(ctx).Debugf("changing OOM score to %d", config.OOMScore)
|
||||
if err := sys.SetOOMScore(os.Getpid(), config.OOMScore); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user