diff options
Diffstat (limited to 'manifests/subsystem/sysctl/panic.pp')
-rw-r--r-- | manifests/subsystem/sysctl/panic.pp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/manifests/subsystem/sysctl/panic.pp b/manifests/subsystem/sysctl/panic.pp index 2657542..4501937 100644 --- a/manifests/subsystem/sysctl/panic.pp +++ b/manifests/subsystem/sysctl/panic.pp @@ -1,13 +1,16 @@ -class nodo::subsystem::sysctl::appliance($kernel_panic = lookup('nodo::sysctl::appliance', undef, undef, '20')) { +class nodo::subsystem::sysctl::panic($seconds = lookup('nodo::sysctl::panic', undef, undef, '20')) { + # See https://www.systutorials.com/how-to-make-linux-automatically-reboot-after-a-kernel-panic/ + # https://unix.stackexchange.com/questions/29567/how-to-early-configure-linux-kernel-to-reboot-on-panic + # https://sysctl-explorer.net/kernel/panic/ file { "/etc/sysctl.d/kernel.panic.conf": owner => "root", group => "root", mode => '0644', ensure => present, - content => "kernel.panic = ${kernel_panic}\n", + content => "kernel.panic = ${seconds}\n", } - exec { "/bin/echo '${kernel_panic}' > /proc/sys/kernel/panic": + exec { "/bin/echo '${seconds}' > /proc/sys/kernel/panic": subscribe => File["/etc/sysctl.d/kernel.panic.conf"], refreshonly => true, } |