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

Bug #14088

Puppet yum provider for package resource does not appear to use 'release' tag to ensure latest

Added by Mark Koch over 2 years ago. Updated 11 months ago.

Status:AcceptedStart date:04/19/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected Puppet version: Branch:
Keywords:customer

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-683


Description

Puppet’s yum provider for the package resource does not appear to offer complete support for RPM naming/versioning.

Yum compares RPMs using the RPM naming convention (e.g name-version-release.arch.rpm). Our snapshot RPMs make use of this convention and rely upon the fact that yum can distinguish between RPMs based on the release components.

For example, in our yum snapshot repo we have;

mds-2.0.1-SNAPSHOT20120418213747.noarch.rpm
mds-2.0.1-SNAPSHOT20120418220425.noarch.rpm
mds-2.0.1-SNAPSHOT20120418221358.noarch.rpm
mds-2.0.1-SNAPSHOT20120418223400.noarch.rpm

When we run ‘yum install mds-2.0.1’, yum will select the rpm with release = SNAPSHOT20120418223400 as the latest version of mds-2.0.1.

When we attempt to use Puppet’s package resource to perform the same operation with

package { 'mds-2.0.1':
    ensure => latest
}

Puppet appears to use rpm to gather information about the local install but then does not compare the result to what the yum repo can provide (.i.e. compare release tags). Instead it simply ensures that an rpm with a matching name-version has been installed.

To workaround this issue we’re currently calling yum directly using,

exec { "install mds-${meter_data_service_version}":
    command => "yum -d 1 -e 1 install mds-${meter_data_service_version} -y",
    path    => "/usr/bin/",
}

This is functional but couples us to yum and is not recommended practice in Puppet.


Related issues

Related to Puppet - Bug #17745: Comparing package versions in puppet behaves differently ... Needs More Information
Related to Puppet - Bug #20221: Cannot install the latest release of a specific package v... Needs More Information

History

#1 Updated by Anonymous over 2 years ago

  • Status changed from Unreviewed to Accepted

#2 Updated by Zachary Stern 11 months ago

  • Keywords set to customer

Also available in: Atom PDF