The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #14560

package/apt provider needs to allow holding and ensuring a particular version at the same time

Added by Russell Jackson over 2 years ago. Updated 7 months ago.

Status:Needs More InformationStart date:05/17/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Debian
Target version:-
Affected Puppet version:2.7.14 Branch:
Keywords:debian apt dpkg package hold held

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket is now tracked at: https://tickets.puppetlabs.com/browse/PUP-1719


Description

The package provider needs to be able to ensure a particular version of a package while also being able to set a hold status simultaneously. Currently, I’m forced to use an exec to install the package and then have the package provider ensure it being held. I can do it the other way around, but then I get change notices about the package version changing from ‘held’ to the ensured version on every run.

History

#1 Updated by Russell Jackson over 2 years ago

  • Keywords changed from debian apt package hold held to debian apt dpkg package hold held

#2 Updated by Kelsey Hightower about 2 years ago

  • Status changed from Unreviewed to Needs More Information

Russell,

Can you post an example manifest with the exec and package resources? I’m starting to notice a pattern that every package type needs a way to allow special options for the various use cases out there.

#3 Updated by Russell Jackson about 2 years ago

For example, I need to stay on mcollective 1.2 under squeeze. I could just ensure 1.2, but then some idiot (me) will go and do an apt-get upgrade and screw everything up. Holding the package seems like it would be the obvious solution, but I can’t do both at the same time with the package resource; hence, the following atrocity:

exec { "install-mcollective":
  command => "/usr/bin/apt-get -qq install mcollective=1.2.1-1",
  unless  => "/usr/bin/dpkg --get-selections mcollective | /bin/grep -qE 'install|hold'",
}
package { "mcollective":
  ensure  => held,
  require => Exec['install-mcollective'],
}

#4 Updated by Russell Jackson about 2 years ago

This serverfault thread shows the problem and workarounds (and their problems) concisely.

#5 Updated by Jens Bräuer over 1 year ago

I’d really love to see this fixed. 2 more use-cases, why it would be good to fix this

a) As this is a issue with the Package Type, it also impacts MCollective, which re-uses Puppet RAL (eg. package agent) b) One more example why someone needs a specific version: Logstash. It requires ElasticSearch 0.20.2, but latest stable is 0.20.5 as of writing.

#7 Updated by Adrien Thebo 7 months ago

Redmine Issue #14560 has been migrated to JIRA:

https://tickets.puppetlabs.com/browse/PUP-1719

Also available in: Atom PDF