server: only warn on failed OOM score adjust

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2017-12-11 14:32:56 -08:00
parent 6393165b09
commit af5d03e8e9
No known key found for this signature in database
GPG Key ID: 67B3DED84EDC823F

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 != "" {