Add CTDB tunables.d/ directory
As a vendor, I really want a way of keeping my required tunables settings separate from those a customer might set. I first decided to add ctdb.tunables.local. That seemed inflexible and a colleague suggested adding includes. Although easy on the surface (just treat the include key/tunable as special, like smb.conf does), you need to detect loops, have a maximum include depth (I had decided on 1), decide whether to support wildcards and even consider possible security implications. I also noticed that other software (e.g. sysctl) seems to have moved on from includes to using (sometimes multiple) *.d/ directories.
So, tunables.d/*.tunables it is!
Some of the changes improve logging for the multi-file situation. Unit testcases have been added to cover the new uses. I have hand tested combinations of working/broken tunables files (including missing tunables.d/ directory) with local daemons. Both types of testing have been run with vagrant -qvalgrind -q.
Checklist
-
Commits have Signed-off-by:with name/author being identical to the commit author -
(optional) This MR is just one part towards a larger feature. -
(optional, if backport required) Bugzilla bug filed and BUG:tag added -
Test suite updated with functionality tests -
Test suite updated with negative tests -
Documentation updated -
CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)
Reviewer's checklist:
-
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md -
This feature/change has adequate documentation added -
No obvious mistakes in the code