~stgraber/upstart/fix-oom-containers

Viewing all changes in revision 1259.

  • Committer: Stéphane Graber
  • Date: 2010-12-22 04:10:37 UTC
  • Revision ID: stgraber@ubuntu.com-20101222041037-37j8bbgtih8h9x7m
When setting oom_adj fails with "Operation not permitted", try with an
higher score until it works.

That fixes cases where setting oom_adj would make the job to fail when
restriction on oom_adj exist, like with containers.

On usual system, the code will behave as it used to, on containers where
oom_adj is restricted to only certain values, the code will try them one
by one until one works and will log (as warning) the various attempts.

This fixes cases where critical daemon like ssh won't start in containers

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: