Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase default CacheSize to 32M, the default in 6.0 #895

Merged
merged 3 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
# Zabbix-server
$server_alertscriptspath = '/etc/zabbix/alertscripts'
$server_allowroot = '0'
$server_cachesize = '8M'
$server_cachesize = '32M'
evgeni marked this conversation as resolved.
Show resolved Hide resolved
$server_cacheupdatefrequency = '60'
$server_config_group = 'zabbix'
$server_config_owner = 'zabbix'
Expand Down Expand Up @@ -365,7 +365,7 @@

# Proxy specific params
$proxy_allowroot = '0'
$proxy_cachesize = '8M'
$proxy_cachesize = '32M'
$proxy_configfile_path = '/etc/zabbix/zabbix_proxy.conf'
$proxy_configfrequency = '3600'
$proxy_database_host = 'localhost'
Expand Down
53 changes: 52 additions & 1 deletion spec/acceptance/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class { 'postgresql::globals':
locale => 'en_US.UTF-8',
manage_package_repo => $facts['os']['release']['major'] != '8',
manage_dnf_module => $facts['os']['release']['major'] == '8',
version => '12',
version => '13',
}
-> class { 'postgresql::server': }
-> class { 'zabbix::database': }
Expand All @@ -45,4 +45,55 @@ class { 'postgresql::globals':
it { is_expected.to be_enabled }
end
end

supported_versions.each do |zabbix_version|
# >= 5.2 server packages are not available for RHEL 7
next if zabbix_version >= '5.2' && default[:platform] == 'el-7-x86_64'

context "deploys a zabbix #{zabbix_version} server" do
# Using puppet_apply as a helper
it 'works idempotently with no errors' do
# this is a minimal working example if you've a postgres server
# running on another node. multinode testing with beaker is pain,
# so we will deploy multiple services into one box
# pp = <<-EOS
# class { 'zabbix::server':
# manage_database => false,
# }
# EOS

# this will actually deploy apache + postgres + zabbix-server + zabbix-web
pp = <<-EOS
class { 'postgresql::globals':
encoding => 'UTF-8',
locale => 'en_US.UTF-8',
manage_package_repo => $facts['os']['release']['major'] != '8',
manage_dnf_module => $facts['os']['release']['major'] == '8',
version => '13',
}
-> class { 'postgresql::server': }
-> class { 'zabbix::database': }
-> class { 'zabbix::server':
zabbix_version => "#{zabbix_version}"
}
EOS

prepare_host

# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end

# do some basic checks
describe package('zabbix-server-pgsql') do
it { is_expected.to be_installed }
end

describe service('zabbix-server') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end
end
end
end
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class { 'postgresql::globals':
locale => 'en_US.UTF-8',
manage_package_repo => $facts['os']['release']['major'] != '8',
manage_dnf_module => $facts['os']['release']['major'] == '8',
version => '12',
version => '13',
}
-> class { 'postgresql::server': }

Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class { 'postgresql::globals':
locale => 'en_US.UTF-8',
manage_package_repo => $facts['os']['release']['major'] != '8',
manage_dnf_module => $facts['os']['release']['major'] == '8',
version => '12',
version => '13',
}
-> class { 'postgresql::server': }

Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_hostgroup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class { 'postgresql::globals':
locale => 'en_US.UTF-8',
manage_package_repo => $facts['os']['release']['major'] != '8',
manage_dnf_module => $facts['os']['release']['major'] == '8',
version => '12',
version => '13',
}
-> class { 'postgresql::server': }

Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class { 'postgresql::globals':
locale => 'en_US.UTF-8',
manage_package_repo => $facts['os']['release']['major'] != '8',
manage_dnf_module => $facts['os']['release']['major'] == '8',
version => '12',
version => '13',
}
-> class { 'postgresql::server': }

Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_template_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class { 'postgresql::globals':
locale => 'en_US.UTF-8',
manage_package_repo => $facts['os']['release']['major'] != '8',
manage_dnf_module => $facts['os']['release']['major'] == '8',
version => '12',
version => '13',
}
-> class { 'postgresql::server': }

Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/zabbix_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class { 'postgresql::globals':
locale => 'en_US.UTF-8',
manage_package_repo => $facts['os']['release']['major'] != '8',
manage_dnf_module => $facts['os']['release']['major'] == '8',
version => '12',
version => '13',
}
-> class { 'postgresql::server': }

Expand Down
4 changes: 2 additions & 2 deletions spec/classes/proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
let(:params) do
{
allowroot: '0',
cachesize: '8M',
cachesize: '32M',
configfrequency: '3600',
database_host: 'localhost',
database_name: 'zabbix-proxy',
Expand Down Expand Up @@ -321,7 +321,7 @@
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartSNMPTrapper=0$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^ListenIP=192.168.1.1$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^HousekeepingFrequency=1$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^CacheSize=8M$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^CacheSize=32M$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^StartDBSyncers=4$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^HistoryCacheSize=16M$} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_proxy.conf').with_content %r{^Timeout=20$} }
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
{
alertscriptspath: '${datadir}/zabbix/alertscripts',
allowroot: '1',
cachesize: '8M',
cachesize: '32M',
cacheupdatefrequency: '30',
database_host: 'localhost',
database_name: 'zabbix-server',
Expand Down Expand Up @@ -271,7 +271,7 @@

it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^AlertScriptsPath=\$\{datadir\}/zabbix/alertscripts} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^AllowRoot=1} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^CacheSize=8M} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^CacheSize=32M} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^CacheUpdateFrequency=30} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^DBHost=localhost} }
it { is_expected.to contain_file('/etc/zabbix/zabbix_server.conf').with_content %r{^DBName=zabbix-server} }
Expand Down