Dispatch results are logged at debug level instead of info.
oom diagnostic logging

Disable the oom killer for a container's memory cgroup when the memory
limit is set. If oom occurs later, the problem task (that is, the one
which triggered oom) will be suspended ([1]) and the oom notifier will
be driven. This gives us the opportunity to gather diagnostics showing
details of the out of memory condition.

In the oom notifier, log memory usage, memory limit, swap + memory
usage, swap + memory limit and statistics and re- enable the oom
killer.

Re-enabling the oom killer is necessary in spite of the fact that the
oom notifier proceeds to terminate the container. This is because the
current method of terminating the container can, at least in theory,
deadlock when the container is out of memory (wshd can require more
memory, e.g. for a stack frame, and be suspended due to lack of
memory).

Once re-enabled, the oom killer will kill a task (usually the
application) in the container ([2]) and this will enable container
termination to successfully kill the remaining tasks via wshd. If wshd
hits the container's memory limit with the oom killer enabled, the oom
killer will kill it and this will kill all the other processes in the
container (since wshd is the PID namespace parent).

IntelliJ IDEA .iml files are ignored.

Footnotes:

[1] Linux kernel's ./Documentation/cgroups/memory.txt states:

    "If OOM-killer is disabled, tasks under cgroup will hang/sleep in
     memory cgroup's OOM-waitqueue when they request accountable
     memory."

[2] Although memory.txt does not specify that re-enabling the oom
    killer in the oom notifier will cause it to kill a task, this
    seems like the only reasonable behaviour and it seems to work
    that way in practice.
Merge remote-tracking branch 'origin/pr/49'

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Backfill spec for #49

[#63931128]

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Remove unneccessary nested warden cgroup FS dance

Signed-off-by: David Varvel <dvarvel@pivotallabs.com>
Remove lying test.

Signed-off-by: David Varvel <dvarvel@pivotallabs.com>
Merge pull request #54 from glyn/master

oom diagnostic logging
Revert "oom diagnostic logging"

This reverts commit 1447b38816ddcad61e1b1393a55a9b7602c193c3.
Inline scripts to run specs in ci

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>
uncomment accidentally commented vagrant destroy

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>
Fail with a more descriptive error

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>
Add bash hashbang

So sh does not get used on jenkins

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>
No longer need to create vagrant box locally

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Ignore .vagrant/

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>