Merge pull request #1906 from stevvooe/change-on-oom-failure

server: only warn on failed OOM score adjust
This commit is contained in:
Phil Estes 2017-12-12 11:09:59 -05:00 committed by GitHub
commit 03bc5e974d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,9 +19,9 @@ func apply(ctx context.Context, config *Config) error {
}
}
if config.OOMScore != 0 {
log.G(ctx).Infof("changing OOM score to %d", config.OOMScore)
log.G(ctx).Debugf("changing OOM score to %d", config.OOMScore)
if err := sys.SetOOMScore(os.Getpid(), config.OOMScore); err != nil {
return err
log.G(ctx).WithError(err).Errorf("failed to change OOM score to %d", config.OOMScore)
}
}
if config.Cgroup.Path != "" {