-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
BREAKING: Add acceptance tests + multiple bugfixes #382
BREAKING: Add acceptance tests + multiple bugfixes #382
Conversation
The diff got quite huge. I initially only wanted to add a single acceptance test, to test the new archlinux vagrant image. I found multiple issues during that. Each important commit has a description which describes the changes. |
f03508e
to
8f97884
Compare
Acceptance tests on vagrant ubuntu16.04 and debian-8 fail, the module isn't idempotent there. It works on fedora-25, fedora-24, archlinux, centos-7, |
@@ -0,0 +1,13 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add this to modulesync_config if this PR gets accepted
require 'beaker/puppet_install_helper' | ||
require 'beaker/module_install_helper' | ||
|
||
run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are so many different ways to install puppet in a module, is this the current best practice?
Gemfile
Outdated
@@ -55,7 +55,7 @@ group :system_tests do | |||
gem 'beaker-rspec', :require => false | |||
end | |||
gem 'serverspec', :require => false | |||
gem 'beaker-puppet_install_helper', :require => false | |||
gem 'puppet-module-posix-system-r2.3', :require => false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puppetlabs bundled all their gems in a metagem called puppet-module-posix-system. I'm notsure if I really like this or if we should instead include all the gems directly. However, this should be changed in modulesync_config as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8f97884
to
586cbee
Compare
spec/spec_helper_acceptance.rb
Outdated
# Configure all nodes in nodeset | ||
c.before :suite do | ||
hosts.each do |host| | ||
copy_module_to(host, :source => proj_root, :module_name => 'ntp') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the install_module_on
helper already does this for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep! updated
$tlsservercertissuer = $zabbix::params::agent_tlsservercertissuer, | ||
$tlsservercertsubject = $zabbix::params::agent_tlsservercertsubject, | ||
String $agent_config_owner = $zabbix::params::agent_config_owner, | ||
String $agent_config_group = $zabbix::params::agent_config_group, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit hard to tell here if you added parameters or if this is just whitespace fixing.
It seems agent_config_* are new?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats why I throw them in their own commit: 8bdcadd
manifests/agent.pp
Outdated
@@ -375,4 +380,13 @@ | |||
'ESTABLISHED'], | |||
} | |||
} | |||
# the agent doesn't work perfectly fine with selinux | |||
# https://support.zabbix.com/browse/ZBX-11631 | |||
if $facts['os']['selinux']['config_mode'] == 'enforcing' { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make this conditional on $manage_selinux?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, added.
templates/zabbix_agentd.conf.erb
Outdated
### Option: LogFile | ||
# Name of log file. | ||
# If not set, syslog is used. | ||
# | ||
LogFile=<%= @logfile %> | ||
LogFile=<%= @logfile %><% end %> | ||
<% end %> | ||
|
||
### Option: LogFileSize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not make sense to wrap the if around the comment block so it doesn't appear if you don't set it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, fixed.
8dadff3
to
b23d4a2
Compare
11585a6
to
1659dcc
Compare
If we want to do this the beautiful way we first need to merge: |
1659dcc
to
b634c50
Compare
this got successfully tested at voxpupuli/puppet-zabbix#382
6690d22
to
42d8fc3
Compare
dede134
to
9295695
Compare
3.0 is really old, 3.2 is stable since a long time. We need the 3.2 package for proper acceptance tests.
We hardcoded the default owner/group, this was bad. This is now configureable. Also we use a separate user on archlinux. This prohibits the agent from reading the configs from the proxy or server.
We manage selinux in a few places. There are systems where this is prohibited for puppet. We will manage it when it is on enforcing. This parameter allows people to disable it in each class, even if it is on enforcing.
the user is optional, we don't have to provide it.
9295695
to
cc7400e
Compare
We added the --foreground to honor the systemd upstream recommendations. However, this option is only available in zabbix 3.0 and newer. 2.2 still has support. Additional information: voxpupuli#382 http://www.zabbix.com/life_cycle_and_release_policy https://www.zabbix.com/documentation/2.4/manpages/zabbix_agentd https://www.zabbix.com/documentation/3.0/manpages/zabbix_agentd
We added the --foreground to honor the systemd upstream recommendations. However, this option is only available in zabbix 3.0 and newer. 2.2 still has support. Additional information: voxpupuli#382 http://www.zabbix.com/life_cycle_and_release_policy https://www.zabbix.com/documentation/2.4/manpages/zabbix_agentd https://www.zabbix.com/documentation/3.0/manpages/zabbix_agentd
Hi @ianssoftcom, thanks for the notice. I created #396 |
We added the --foreground to honor the systemd upstream recommendations. However, this option is only available in zabbix 3.0 and newer. 2.2 still has support. Additional information: voxpupuli#382 http://www.zabbix.com/life_cycle_and_release_policy https://www.zabbix.com/documentation/2.4/manpages/zabbix_agentd https://www.zabbix.com/documentation/3.0/manpages/zabbix_agentd
We added the --foreground to honor the systemd upstream recommendations. However, this option is only available in zabbix 3.0 and newer. 2.2 still has support. Additional information: voxpupuli#382 http://www.zabbix.com/life_cycle_and_release_policy https://www.zabbix.com/documentation/2.4/manpages/zabbix_agentd https://www.zabbix.com/documentation/3.0/manpages/zabbix_agentd
We added the --foreground to honor the systemd upstream recommendations. However, this option is only available in zabbix 3.0 and newer. 2.2 still has support. Additional information: voxpupuli#382 http://www.zabbix.com/life_cycle_and_release_policy https://www.zabbix.com/documentation/2.4/manpages/zabbix_agentd https://www.zabbix.com/documentation/3.0/manpages/zabbix_agentd
We added the --foreground to honor the systemd upstream recommendations. However, this option is only available in zabbix 3.0 and newer. 2.2 still has support. Additional information: voxpupuli#382 http://www.zabbix.com/life_cycle_and_release_policy https://www.zabbix.com/documentation/2.4/manpages/zabbix_agentd https://www.zabbix.com/documentation/3.0/manpages/zabbix_agentd
No description provided.