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

There is no way to actually control the version of collect being installed. #676

Open
jbehrends opened this issue May 31, 2017 · 2 comments

Comments

@jbehrends
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.3.2
  • Ruby: 2.1.8
  • Distribution: CentOS 7.3
  • Module version: latest

How to reproduce (e.g Puppet code you use)

class { '::collectd':
minimum_version => '5.4.1-1'
}

What are you seeing

I have a newer version of collectd in my local yum repo. So on a brand new install, puppet is installing the latest version of collectd, and NOT the version I have specified.

As a result when puppet tries to install collectd-java at version 5.4.1-1 puppet errors out because collectd version 5.7.1-1 is already installed and it wants collectd-5.4.1-1.

What behaviour did you expect instead

I would expect the module to install the version I have specified.

Output log

If i run puppet with --debug on a new machine I can see it installing collectd with no version which means it's going to get the latest version and not the version I defined.

Debug: Executing: '/bin/rpm -q collectd --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing: '/usr/bin/yum -d 0 -e 0 -y list collectd'
Debug: Packagecollectd: Ensuring => present
Debug: Executing: '/usr/bin/yum -d 0 -e 0 -y install collectd'
Notice: /Stage[main]/Collectd::Install/Package[collectd]/ensure: created
Debug: /Stage[main]/Collectd::Install/Package[collectd]: The container Class[Collectd::Install] will propagate my refresh event
Debug: Class[Collectd::Install]: The container Stage[main] will propagate my refresh event

@alexjfisher
Copy link
Member

To specify an exact version to install, you'll want to use the package_ensure parameter.

$package_ensure = $collectd::params::package_ensure,

minimum_version is useful if you don't want to run puppet twice. See https://github.com/voxpupuli/puppet-collectd#puppet-needs-two-runs-to-correctly-write-my-conf-why

@h0tw1r3
Copy link

h0tw1r3 commented Oct 16, 2017

minimum_version does not work properly with upgrades (changing package_ensure to a version or latest).

Example: From a currently installed 4.10, change minimum_version to 5.7 and package ensure to latest. Two puppet runs are required to fully apply the configuration.

collectd_version is itempotent (and thus collectd_version_real).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants