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

BREAKING: Add acceptance tests + multiple bugfixes #382

Merged
merged 33 commits into from
May 24, 2017

Conversation

bastelfreak
Copy link
Member

No description provided.

@bastelfreak bastelfreak self-assigned this May 21, 2017
@bastelfreak
Copy link
Member Author

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.

@bastelfreak bastelfreak force-pushed the bastelfreak_acceptance_tests branch from f03508e to 8f97884 Compare May 21, 2017 13:33
@bastelfreak
Copy link
Member Author

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 @@
---
Copy link
Member Author

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'
Copy link
Member Author

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
Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bastelfreak bastelfreak force-pushed the bastelfreak_acceptance_tests branch from 8f97884 to 586cbee Compare May 21, 2017 14:22
# Configure all nodes in nodeset
c.before :suite do
hosts.each do |host|
copy_module_to(host, :source => proj_root, :module_name => 'ntp')
Copy link
Member

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.

Copy link
Member Author

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,
Copy link

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?

Copy link
Member Author

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

@@ -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' {
Copy link

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, added.

### Option: LogFile
# Name of log file.
# If not set, syslog is used.
#
LogFile=<%= @logfile %>
LogFile=<%= @logfile %><% end %>
<% end %>

### Option: LogFileSize
Copy link

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, fixed.

@bastelfreak bastelfreak force-pushed the bastelfreak_acceptance_tests branch 6 times, most recently from 8dadff3 to b23d4a2 Compare May 21, 2017 20:50
@bastelfreak bastelfreak force-pushed the bastelfreak_acceptance_tests branch from 11585a6 to 1659dcc Compare May 21, 2017 21:12
@bastelfreak bastelfreak force-pushed the bastelfreak_acceptance_tests branch from 1659dcc to b634c50 Compare May 21, 2017 22:52
bastelfreak added a commit to bastelfreak/modulesync_config that referenced this pull request May 23, 2017
this got successfully tested at voxpupuli/puppet-zabbix#382
@bastelfreak bastelfreak force-pushed the bastelfreak_acceptance_tests branch 2 times, most recently from 6690d22 to 42d8fc3 Compare May 23, 2017 18:25
@bastelfreak bastelfreak changed the title [WIP] Add acceptance tests + multiple bugfixes Add acceptance tests + multiple bugfixes May 23, 2017
@bastelfreak bastelfreak force-pushed the bastelfreak_acceptance_tests branch 3 times, most recently from dede134 to 9295695 Compare May 24, 2017 16:38
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.
@bastelfreak bastelfreak force-pushed the bastelfreak_acceptance_tests branch from 9295695 to cc7400e Compare May 24, 2017 17:22
@dhollinger dhollinger merged commit 63effd6 into voxpupuli:master May 24, 2017
@dhollinger dhollinger changed the title Add acceptance tests + multiple bugfixes BREAKING: Add acceptance tests + multiple bugfixes May 24, 2017
bastelfreak added a commit to bastelfreak/puppet-zabbix that referenced this pull request Jun 3, 2017
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
bastelfreak added a commit to bastelfreak/puppet-zabbix that referenced this pull request Jun 3, 2017
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
@bastelfreak
Copy link
Member Author

Hi @ianssoftcom, thanks for the notice. I created #396

@bastelfreak bastelfreak deleted the bastelfreak_acceptance_tests branch June 3, 2017 11:40
bastelfreak added a commit to bastelfreak/puppet-zabbix that referenced this pull request Jun 3, 2017
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
bastelfreak added a commit to bastelfreak/puppet-zabbix that referenced this pull request Jun 3, 2017
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
bastelfreak added a commit to bastelfreak/puppet-zabbix that referenced this pull request Jun 3, 2017
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
bastelfreak added a commit to bastelfreak/puppet-zabbix that referenced this pull request Jun 3, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants