From d61fff55fc4c19b257107ca5d81db4f468a79874 Mon Sep 17 00:00:00 2001 From: Dennis Camera Date: Tue, 23 Feb 2021 14:08:09 +0100 Subject: [PATCH] __ssrq_zfs add --tunable and set ZFS tunables on kamor --- type/__ssrq_zfs/man.rst | 8 ++++++++ type/__ssrq_zfs/manifest | 10 ++++++++++ type/__ssrq_zfs/parameter/optional_multiple | 1 + 3 files changed, 19 insertions(+) create mode 100644 type/__ssrq_zfs/parameter/optional_multiple diff --git a/type/__ssrq_zfs/man.rst b/type/__ssrq_zfs/man.rst index f9e5981..c3da687 100644 --- a/type/__ssrq_zfs/man.rst +++ b/type/__ssrq_zfs/man.rst @@ -20,6 +20,14 @@ OPTIONAL PARAMETERS ------------------- mailto The user or email address to which alert mails should be sent to. +tunable + Set a ZFS tunable parameter to the given value. + Use this option multiple times to set more than one tunable. + + The value should be a key-value pair separated by a ``=`` (equals sign). + + For a reference of available tunables, cf. + `zfs-module-parameters(5) `_. BOOLEAN PARAMETERS diff --git a/type/__ssrq_zfs/manifest b/type/__ssrq_zfs/manifest index eb0a7af..5e13087 100755 --- a/type/__ssrq_zfs/manifest +++ b/type/__ssrq_zfs/manifest @@ -76,6 +76,16 @@ in ;; esac +require='__package_apt/zfs-modules' \ +__block /etc/modprobe.d/zfs.conf:cdist-zfs-tunables \ + --state "$(test -s "${__object:?}/parameter/tunable" && echo present || echo absent)" \ + --file /etc/modprobe.d/zfs.conf \ + --prefix '# cdist:zfs-tunables' \ + --suffix '#/cdist:zfs-tunables' \ + --text - <