puppet-splunk
puppet-splunk copied to clipboard
net-tools 'installed' over and over, but is really installing splunkforwarder
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 6.21.1
- Ruby: ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-linux] (bundled with puppet)
- Distribution: Centos 8 Streams
- Module version: 8.0.0
How to reproduce (e.g Puppet code you use)
class { '::splunk::params':
version => '8.0.6',
build => '152fb4b2bb96',
src_root => 'https://download.splunk.com',
}
class { '::splunk::forwarder':
package_ensure => $::splunk::params::version,
use_default_config => false,
forwarder_input => {
'default_host' => {
section => 'default',
setting => 'host',
value => $facts['normalized_fqdn'],
tag => 'splunk_forwarder',
},
}
}
What are you seeing
On every run, net-tools gets 'reinstalled', see output log before. It's really installing splunkfoirwarder over and over.
What behaviour did you expect instead
net-tools should install net-tools =)
Output log
Debug: Package[net-tools](provider=dnf): Ensuring => present
Debug: Package[net-tools](provider=dnf): Installing directly from /opt/staging/splunk/splunkforwarder-8.0.6-152fb4b2bb96-linux-2.6-x86_64.rpm
Debug: Executing: '/bin/dnf -d 0 -e 1 -y install /opt/staging/splunk/splunkforwarder-8.0.6-152fb4b2bb96-linux-2.6-x86_64.rpm'
Notice: /Stage[main]/Splunk::Forwarder::Install/Package[net-tools]/ensure: created (corrective)
Debug: /Package[net-tools]: The container Class[Splunk::Forwarder::Install] will propagate my refresh event
Any additional information you'd like to impart
Overriding the defaults for Package above it, around lines 24-30, is what's causing this. Those defaults carry over to the net-tools install and cause it to install the wrong thing.
As a workaround you should be able to set $manage_net_tools to false. This ability was introduced in #303.
Hey @bastelfreak!
We are currently also running into issues with the net-tools package. For some reasons we can only use the builds from forge, but no direct github repos. Do you have any idea if a new version (including fixes from #303 ) will be released to forge anytime soon?
we do a new release in https://github.com/voxpupuli/puppet-splunk/pull/317
As per https://docs.splunk.com/Documentation/UnixAddOn/6.0.0/User/Platformandhardwarerequirements:
The Splunk Add-on for Unix and Linux requires this additional software package to be installed on RHEL 7 and CentOS 7 (use your OS-specific package manager to install this package if it is not already installed):
net-tools
So it might be safe to disable it depending on your platform.