From 927aa460b04e389177f0dda3ffdf4b383f0c2497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Gonz=C3=A1lez=20Serrano?= Date: Mon, 14 Oct 2019 10:46:25 +0200 Subject: [PATCH] Add support for debian 9 --- manifests/cache.pp | 3 ++- manifests/params.pp | 2 +- metadata.json | 4 +++- templates/rrdcached.conf.erb | 8 ++++++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/manifests/cache.pp b/manifests/cache.pp index f7c23b3..c4cbb90 100644 --- a/manifests/cache.pp +++ b/manifests/cache.pp @@ -2,7 +2,8 @@ class rrd::cache ( $ensure = 'installed', $service = 'running', - $listen = $rrd::params::cache_listen, + $sock_file = $rrd::params::cache_sock_file, + $listen = "unix:${sock_file}", $gid = undef, $journal_dir = $rrd::params::cache_journal_dir, $timeout = $rrd::params::cache_timeout, diff --git a/manifests/params.pp b/manifests/params.pp index 426418e..9dffd08 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,7 +1,7 @@ # Defaults and variables class rrd::params { - $cache_listen = 'unix:/var/run/rrdcached.sock' + $cache_sock_file = '/var/run/rrdcached.sock' $cache_journal_dir = '/var/lib/rrdcached/journal/' $cache_timeout = '1800' $cache_delay = '1800' diff --git a/metadata.json b/metadata.json index 31bdb53..cdd460a 100644 --- a/metadata.json +++ b/metadata.json @@ -16,7 +16,9 @@ "operatingsystem": "Debian", "operatingsystemrelease": [ "6", - "7" + "7", + "8", + "9" ] }, { diff --git a/templates/rrdcached.conf.erb b/templates/rrdcached.conf.erb index a535ae7..f62dc8f 100644 --- a/templates/rrdcached.conf.erb +++ b/templates/rrdcached.conf.erb @@ -13,6 +13,14 @@ DISABLE=<%= @service_enable ? '0' : '1' %> # (do not specify -p - this is handled by the init script) # default: see /etc/init.d/rrdcached OPTS="-t <%= @write_threads %> -w <%= @timeout %> -z <%= @delay %> -j <%= @journal_dir %> <%- if @gid -%> -s <%= @gid %><% end %> -l <%= @listen %><%= @always_flush ? ' -F' : '' %> -b <%= @jump_dir %><%= @restrict_writes ? ' -B' : '' %>" +WRITE_THREADS="<%= @write_threads %>" +WRITE_TIMEOUT="<%= @timeout %>" +WRITE_JITTER="<%= @delay %>" +JOURNAL_PATH="<%= @journal_dir %>" +<%- if @gid -%>SOCKGROUP="<%= @gid %>"<% end %> +SOCKFILE="<%= @sock_file %>" +BASE_OPTIONS="<%= @always_flush ? ' -F' : '' %> <%= @restrict_writes ? ' -B' : '' %>" +BASE_PATH="<%= @jump_dir %>" # number of seconds to wait for rrdcached to shut down # (writing the data to disk may take some time;