Sysctl handling on kdump-tools
Kdump-tools currently has 2 issues related to sysctls: (1) It doesn't respect KDUMP_SYSCTL, after some commit removes it partially - by partially, it means it wasn't removed, but the feature does not work anymore. (2) There's no way to control sysctls on kdump environment - it "inherits" sysctl configuration of the host, which could be problematic specially in case of hugepages setting as sysctl in the regular boot.
This series addresses (1) [first patch] and (2) [patches two and three]. We changed the KDUMP_SYSCTL name to prevent confusion...the idea is to rename it to KDUMP_PANIC_TRIGGERS since the goal for this configuration is to set the panic options. Regarding (2), we make use of an initrd approach to override sysctls on kdump environment only.
There is a problem in the sysctl overriding for Debian only: patch 2 relies on OPTION=VAR initrd mechanism to restrict kdump hook/script to the kdump smaller initrd. But Debian's initramfs-tools doesn't have this feature, so we have patch 3 to amend patch 2 and include extra checks for Debian. The reason for that is I'm planning to add this feature in Debian's initramfs-tools, hence patch 3 may be reverted soon(tm). Alternatives to it:
(a) What I did - 2 separate patches, one with the feature that works in Ubuntu and the other one for Debian only to adjust for the lack of the feature; (b) Squash both of them and have a single patch - feasible, but decreases the clarity and code sync with Ubuntu, in my opinion; (c) Drop the use of OPTION=VAR approach. I really dislike this idea, since the feature is meant to work with cases like ours (alternative initrds), and Debian not having it is something we should improve instead of accept the limitation...also, the OPTION=VAR approach is safer than adhoc checks on scripts.
Let me know your thoughts, appreciate the reviews! Cheers,
Guilherme