From 6e02376861d89b3dac758f9f336fa1e701730896 Mon Sep 17 00:00:00 2001 From: Anna Nesterova Date: Thu, 29 Jun 2017 14:18:03 -0400 Subject: [PATCH 01/11] added any_of channel to cluster --- manifests/config/cluster.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/config/cluster.pp b/manifests/config/cluster.pp index cad346a..1a3cc26 100644 --- a/manifests/config/cluster.pp +++ b/manifests/config/cluster.pp @@ -13,8 +13,8 @@ validate_string( $file ) } - if ! ($channel in ['carbon_ch', 'fnv1a_ch', 'forward', 'file']) { - fail("channel '${channel}' is not in ['carbon_ch', 'fnv1a_ch', 'forward', 'file']") + if ! ($channel in ['carbon_ch', 'fnv1a_ch', 'forward', 'file', 'any_of']) { + fail("channel '${channel}' is not in ['carbon_ch', 'fnv1a_ch', 'forward', 'file', 'any_of']") } unless is_array( $hosts ) { From 50fab6dc741ad58cd716a9933e32f31383488cdd Mon Sep 17 00:00:00 2001 From: anesterova Date: Wed, 9 Jan 2019 15:41:20 +0200 Subject: [PATCH 02/11] changed ExecReload --- templates/usr/lib/systemd/system/carbon-c-relay.service.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/usr/lib/systemd/system/carbon-c-relay.service.erb b/templates/usr/lib/systemd/system/carbon-c-relay.service.erb index 4e4f8b0..7ba73d3 100644 --- a/templates/usr/lib/systemd/system/carbon-c-relay.service.erb +++ b/templates/usr/lib/systemd/system/carbon-c-relay.service.erb @@ -8,7 +8,7 @@ User=<%= @user %> Group=<%= @group %> EnvironmentFile=/etc/sysconfig/<%= @service_name %> ExecStart=/bin/carbon-c-relay -f <%= @config_file %> $ARGS -ExecReload=/bin/kill -HUP ${MAINPID} +ExecReload=/bin/kill -s HUP $MAINPID Type=simple <% if @limit_fsize -%> # (file size) From 2cd8b38f8354f033bf823eb8dfaee07ded63a9b2 Mon Sep 17 00:00:00 2001 From: anesterova Date: Wed, 8 Jul 2020 15:40:33 +0300 Subject: [PATCH 03/11] removed legacy validate function --- manifests/init.pp | 49 ----------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index eb681be..1d951f7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -181,55 +181,6 @@ $worker_threads = $carbon_c_relay::params::worker_threads ) inherits carbon_c_relay::params { - validate_bool( - $carbon_cache_statistics, - $package_manage, - $service_enable, - $service_manage, - $sorted_matches, - $sorted_rewrites, - ) - - validate_hash( - $config_clusters, - $config_rewrites, - ) - - validate_integer([ - $io_timeout, - $limit_no_file, - $limit_nproc, - $listen, - $listen_backlog, - $max_stalls, - $replication_factor, - $server_batch_size, - $server_queue_size, - $statistics_sending_interval, - $worker_threads, - ]) - - validate_string( - $config_file, - $group, - $init_file, - $init_file_ensure, - $init_template, - $interface, - $log_dir, - $log_file, - $output_file, - $package_ensure, - $package_name, - $pid_dir, - $pid_file, - $service_ensure, - $service_name, - $sysconfig_file, - $sysconfig_template, - $user, - ) - anchor { 'carbon_c_relay::begin': } -> class { '::carbon_c_relay::install': } -> class { '::carbon_c_relay::config': } From fbebee04ec906c17072c0746afc8fcc222ef0723 Mon Sep 17 00:00:00 2001 From: anesterova Date: Tue, 14 Feb 2023 00:09:08 +0200 Subject: [PATCH 04/11] do not set a default value for statistics_sending_interval --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index af3c569..03ae4db 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -40,7 +40,7 @@ $sorted_matches = true $sorted_rewrites = false $statistics_hostname = undef - $statistics_sending_interval = 60 + $statistics_sending_interval = undef $sysconfig_file = '/etc/sysconfig/carbon-c-relay' $sysconfig_template = "carbon_c_relay${sysconfig_file}.erb" $user = 'carbon-c-relay' From 2ef62ee49642c4c6c03ad5fd8acd8e8d9cf48e9c Mon Sep 17 00:00:00 2001 From: anesterova Date: Tue, 14 Feb 2023 00:15:35 +0200 Subject: [PATCH 05/11] make interface optional --- templates/etc/sysconfig/carbon-c-relay.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/etc/sysconfig/carbon-c-relay.erb b/templates/etc/sysconfig/carbon-c-relay.erb index af7571b..440f3cc 100644 --- a/templates/etc/sysconfig/carbon-c-relay.erb +++ b/templates/etc/sysconfig/carbon-c-relay.erb @@ -24,4 +24,4 @@ # -t config test mode: prints rule matches from input on stdin # -H hostname: override hostname (used in statistics) -ARGS=-p <%= @listen %> -i <%= @interface %> -w <%= @worker_threads %> -b <%= @server_batch_size %> -q <%= @server_queue_size %> -l <%= @log_dir %>/<%= @log_file %><% if @max_stalls -%> -L <%= @max_stalls %><% end -%><% if @listen_backlog -%> -B <%= @listen_backlog %><% end -%><% if @io_timeout -%> -T <%= @io_timeout %><% end -%><% if @carbon_cache_statistics -%> -m <% end -%><% if @statistics_sending_interval -%> -S <%= @statistics_sending_interval %><% end -%><% if @allowed_chars -%> -c <%= @allowed_chars %><% end -%><% if @statistics_hostname -%> -H <%= @statistics_hostname %><% end -%> +ARGS=-p <%= @listen %><% if @interface -%> -i <%= @interface %><% end -%> -w <%= @worker_threads %> -b <%= @server_batch_size %> -q <%= @server_queue_size %> -l <%= @log_dir %>/<%= @log_file %><% if @max_stalls -%> -L <%= @max_stalls %><% end -%><% if @listen_backlog -%> -B <%= @listen_backlog %><% end -%><% if @io_timeout -%> -T <%= @io_timeout %><% end -%><% if @carbon_cache_statistics -%> -m <% end -%><% if @statistics_sending_interval -%> -S <%= @statistics_sending_interval %><% end -%><% if @allowed_chars -%> -c <%= @allowed_chars %><% end -%><% if @statistics_hostname -%> -H <%= @statistics_hostname %><% end -%> From 1230de8dca5d179050164ad0e0ea3070b23bf84a Mon Sep 17 00:00:00 2001 From: anesterova Date: Tue, 14 Feb 2023 00:16:06 +0200 Subject: [PATCH 06/11] do not set default value for interface --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index 03ae4db..42718d9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -10,7 +10,7 @@ $init_file = '/etc/init.d/carbon-c-relay' $init_file_ensure = 'file' $init_template = "carbon_c_relay${init_file}.erb" - $interface = '0.0.0.0' + $interface = undef $io_timeout = 600 $limit_fsize = undef $limit_cpu = undef From 0eea4cf6853749a94561425426fdd1778afa0b9d Mon Sep 17 00:00:00 2001 From: anesterova Date: Fri, 12 Jan 2024 16:46:26 +0200 Subject: [PATCH 07/11] require epel repo --- manifests/install.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index cd60348..2bd7e42 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -8,7 +8,8 @@ ) { if $package_manage { - + require epel + group { $group: ensure => present } From 71a3ff6f2d8bbd094084c4285e7c22b13cd3ad4c Mon Sep 17 00:00:00 2001 From: anesterova Date: Fri, 12 Jan 2024 16:49:43 +0200 Subject: [PATCH 08/11] added epel dep --- metadata.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index a60d818..9a6553e 100644 --- a/metadata.json +++ b/metadata.json @@ -8,7 +8,14 @@ "project_page": "https://github.com/mlambrichs/puppet-carbon_c_relay.git", "issues_url": "https://github.com/mlambrichs/puppet-carbon_c_relay/issues", "dependencies": [ - {"name":"puppetlabs-stdlib","version_requirement":">=2.1.3 <5.0.0"} + { + "name": "puppetlabs-stdlib", + "version_requirement":">=2.1.3 <5.0.0" + }, + { + "name": "puppet/epel", + "version_requirement": ">= 3.0.0 < 5.0.0" + } ], "tags": [ "carbon-c-relay", From 6d2e1aa536e1b4c7261d83c04b8d66066db39475 Mon Sep 17 00:00:00 2001 From: anesterova Date: Fri, 12 Jan 2024 16:50:38 +0200 Subject: [PATCH 09/11] bump up stdlib version --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 9a6553e..01867bd 100644 --- a/metadata.json +++ b/metadata.json @@ -10,7 +10,7 @@ "dependencies": [ { "name": "puppetlabs-stdlib", - "version_requirement":">=2.1.3 <5.0.0" + "version_requirement":">=2.1.3 <9.0.0" }, { "name": "puppet/epel", From 5da027e86b86f0e52f94b95b7eb937c9293920ba Mon Sep 17 00:00:00 2001 From: anesterova Date: Fri, 12 Jan 2024 17:19:48 +0200 Subject: [PATCH 10/11] Update install.pp --- manifests/install.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index 2bd7e42..f7a788d 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -8,7 +8,7 @@ ) { if $package_manage { - require epel + include epel group { $group: ensure => present From cccc0a706cd6949e3be394dc56b81bb5eb66354d Mon Sep 17 00:00:00 2001 From: anesterova Date: Fri, 12 Jan 2024 17:25:54 +0200 Subject: [PATCH 11/11] Update install.pp --- manifests/install.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index f7a788d..40f3942 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -20,7 +20,8 @@ } package { $package_name: - ensure => $package_ensure + ensure => $package_ensure, + require => Yumrepo['epel'], } } }