voxpupuli / puppet-splunk

Manage Splunk servers and forwarders using Puppet
https://forge.puppet.com/puppet/splunk
Apache License 2.0
40 stars 121 forks source link

net-tools 'installed' over and over, but is really installing splunkforwarder #308

Open jadestorm opened 3 years ago

jadestorm commented 3 years ago

Affected Puppet, Ruby, OS and module versions/distributions

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.

kenyon commented 3 years ago

As a workaround you should be able to set $manage_net_tools to false. This ability was introduced in #303.

fetzerms commented 3 years ago

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?

bastelfreak commented 3 years ago

we do a new release in https://github.com/voxpupuli/puppet-splunk/pull/317

mpdude commented 2 years ago

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.