Skip to content

Commit

Permalink
Add Debian 12 OS support
Browse files Browse the repository at this point in the history
add OS to metadata, skip acceptance on version 5.0
  • Loading branch information
Valantin committed Mar 8, 2024
1 parent db01009 commit 8f36e13
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 5 deletions.
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"11"
"11",
"12"
]
},
{
Expand Down
3 changes: 3 additions & 0 deletions spec/acceptance/agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
require 'spec_helper_acceptance'

supported_versions.each do |version|
# < 6.0 agent packages are not available for Debian 12
next if version < '6.0' && default[:platform] =~ %r{debian-12}

describe "zabbix::agent class with zabbix_version #{version}" do
it 'works idempotently with no errors' do

Check failure on line 10 in spec/acceptance/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - OracleLinux 7 - Zabbix 6.0

zabbix::agent class with zabbix_version 6.0 works idempotently with no errors Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'oracle7-64-puppet8.example.com' exited with 6 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_145948713.pp.gsjp9x Last 10 lines of output were: �[mNotice: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.conf]: Dependency Package[zabbix-agent] has failures: true Warning: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.conf]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.d]: Skipping because of failed dependencies Warning: /Stage[main]/Systemd::Journald/Service[systemd-journald]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/File[/etc/init.d/zabbix-agent]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/Systemd::Unit_file[zabbix-agent.service]/File[/etc/systemd/system/zabbix-agent.service]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/Systemd::Unit_file[zabbix-agent.service]/Systemd::Daemon_reload[zabbix-agent.service]/Exec[systemd-zabbix-agent.service-systemctl-daemon-reload]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Service[zabbix-agent]: Skipping because of failed dependencies Info: Stage[main]: Unscheduling all events on Stage[main] �[mNotice: Applied catalog in 12.55 seconds

Check failure on line 10 in spec/acceptance/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - Ubuntu 20.04 - Zabbix 6.0

zabbix::agent class with zabbix_version 6.0 works idempotently with no errors Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'ubuntu2004-64-puppet8.example.com' exited with 6 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_145959080.pp.YpnLHc Last 10 lines of output were: Info: Class[Apt]: Unscheduling all events on Class[Apt] Warning: /Stage[main]/Zabbix::Agent/Package[zabbix-agent]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.conf]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.d]: Skipping because of failed dependencies Warning: /Stage[main]/Systemd::Journald/Service[systemd-journald]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/File[/etc/init.d/zabbix-agent]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/Systemd::Unit_file[zabbix-agent.service]/File[/etc/systemd/system/zabbix-agent.service]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/Systemd::Unit_file[zabbix-agent.service]/Systemd::Daemon_reload[zabbix-agent.service]/Exec[systemd-zabbix-agent.service-systemctl-daemon-reload]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Service[zabbix-agent]: Skipping because of failed dependencies �[mNotice: Applied catalog in 4.89 seconds

Check failure on line 10 in spec/acceptance/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - OracleLinux 8 - Zabbix 5.0

zabbix::agent class with zabbix_version 5.0 works idempotently with no errors Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'oracle8-64-puppet8.example.com' exited with 6 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_150003008.pp.CJKTcU Last 10 lines of output were: �[mNotice: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.conf]: Dependency Package[zabbix-agent] has failures: true Warning: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.conf]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.d]: Skipping because of failed dependencies Warning: /Stage[main]/Systemd::Journald/Service[systemd-journald]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/File[/etc/init.d/zabbix-agent]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/Systemd::Unit_file[zabbix-agent.service]/File[/etc/systemd/system/zabbix-agent.service]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/Systemd::Unit_file[zabbix-agent.service]/Systemd::Daemon_reload[zabbix-agent.service]/Exec[systemd-zabbix-agent.service-systemctl-daemon-reload]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Service[zabbix-agent]: Skipping because of failed dependencies Info: Stage[main]: Unscheduling all events on Stage[main] �[mNotice: Applied catalog in 4.42 seconds

Check failure on line 10 in spec/acceptance/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - Ubuntu 20.04 - Zabbix 5.0

zabbix::agent class with zabbix_version 5.0 works idempotently with no errors Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'ubuntu2004-64-puppet7.example.com' exited with 6 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_145958338.pp.PZaBQS Last 10 lines of output were: Info: Class[Apt]: Unscheduling all events on Class[Apt] Warning: /Stage[main]/Zabbix::Agent/Package[zabbix-agent]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.conf]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.d]: Skipping because of failed dependencies Warning: /Stage[main]/Systemd::Journald/Service[systemd-journald]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/File[/etc/init.d/zabbix-agent]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/Systemd::Unit_file[zabbix-agent.service]/File[/etc/systemd/system/zabbix-agent.service]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/Systemd::Unit_file[zabbix-agent.service]/Systemd::Daemon_reload[zabbix-agent.service]/Exec[systemd-zabbix-agent.service-systemctl-daemon-reload]: Skipping because of failed dependencies Warning: /Stage[main]/Zabbix::Agent/Service[zabbix-agent]: Skipping because of failed dependencies �[mNotice: Applied catalog in 3.45 seconds
pp = <<-EOS
Expand Down
5 changes: 5 additions & 0 deletions spec/acceptance/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

require 'spec_helper_acceptance'
describe 'zabbix::server class', unless: default[:platform] =~ %r{archlinux} do
# < 6.0 server packages are not available for Debian 12
next if default[:platform] =~ %r{debian-12}

context 'default parameters' do
# Using puppet_apply as a helper
it 'works idempotently with no errors' do
Expand Down Expand Up @@ -45,6 +48,8 @@ class { 'zabbix::database': }
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
# <6.0 server packages are not available for ubuntu 22.04
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
# < 6.0 server packages are not available for Debian 12
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian-12}

context "deploys a zabbix #{zabbix_version} server" do
# Using puppet_apply as a helper
Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/zabbix_application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
# <6.0 server packages are not available for ubuntu 22.04
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
# < 6.0 server packages are not available for Debian 12
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian12}

template = case zabbix_version
when '5.0'
Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/zabbix_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
# <6.0 server packages are not available for ubuntu 22.04
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
# < 6.0 server packages are not available for Debian 12
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian12}

context "create zabbix_host resources with zabbix version #{zabbix_version}" do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/zabbix_hostgroup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
# <6.0 server packages are not available for ubuntu 22.04
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
# < 6.0 server packages are not available for Debian 12
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian12}

context "create zabbix_hostgroup resources with zabbix version #{zabbix_version}" do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/zabbix_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
# <6.0 server packages are not available for ubuntu 22.04
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
# < 6.0 server packages are not available for Debian 12
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian-12}

context "create zabbix_proxy resources with zabbix version #{zabbix_version}" do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/zabbix_template_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
# <6.0 server packages are not available for ubuntu 22.04
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
# < 6.0 server packages are not available for Debian 12
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian12}

context "create zabbix_template_host resources with zabbix version #{zabbix_version}" do
template = case zabbix_version
Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/zabbix_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
# <6.0 server packages are not available for ubuntu 22.04
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
# < 6.0 server packages are not available for Debian 12
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian-12}

context "create zabbix_template resources with zabbix version #{zabbix_version}" do
# This will deploy a running Zabbix setup (server, web, db) which we can
Expand Down
8 changes: 5 additions & 3 deletions spec/setup_acceptance_node.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
'Debian': {
# On Debian it seems that make is searching for mkdir in /usr/bin/ but mkdir
# does not exist. Symlink it from /bin/mkdir to make it work.
file { '/usr/bin/mkdir':
ensure => link,
target => '/bin/mkdir',
if $facts['os']['release']['major'] < '12' {
file { '/usr/bin/mkdir':
ensure => link,
target => '/bin/mkdir',
}
}
}
'Ubuntu': {
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def baseline_os_hash
},
{
'operatingsystem' => 'Debian',
'operatingsystemrelease' => %w[11]
'operatingsystemrelease' => %w[11 12]
},
{
'operatingsystem' => 'Ubuntu',
Expand Down

0 comments on commit 8f36e13

Please sign in to comment.