Skip to content

Commit

Permalink
[baseimage] kernel oom-killer to panic when the system is truly out o…
Browse files Browse the repository at this point in the history
…f memory (#2988)

- What I did
Currently when the system is under memory pressure, the OOM killer kicks in and kills a rogue process. Killing a rogue process can cause the device to be un-healthy leading to blackholing of the traffic.

To avoid this, configure the OOM to do a kernel panic which will cause the device to reboot and come back up healthy.

- How I did it
Added the sysctl variable panic_on_oom and set the value to 2.
Setting it to 2 will ensure OOM killer to always do a kernel panic.
  • Loading branch information
SuvarnaMeenakshi authored and yxieca committed Jun 13, 2019
1 parent 2295dab commit 0023fca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ set /files/etc/sysctl.conf/kernel.core_pattern '|/usr/bin/coredump-compress %e %
set /files/etc/sysctl.conf/kernel.softlockup_panic 1
set /files/etc/sysctl.conf/kernel.panic 10
set /files/etc/sysctl.conf/vm.panic_on_oom 2
set /files/etc/sysctl.conf/fs.suid_dumpable 2
set /files/etc/sysctl.conf/net.ipv4.conf.default.forwarding 1
Expand Down

0 comments on commit 0023fca

Please sign in to comment.