Jira (PUP-8664) rpm package provider is too specific

8 views
Skip to first unread message

Thomas Kishel (JIRA)

unread,
Apr 17, 2018, 7:20:02 PM4/17/18
to puppe...@googlegroups.com
Thomas Kishel created an issue
 
Puppet / Bug PUP-8664
rpm package provider is too specific
Issue Type: Bug Bug
Affects Versions: PUP 5.3.5
Assignee: Unassigned
Components: Types and Providers
Created: 2018/04/17 4:19 PM
Priority: Normal Normal
Reporter: Thomas Kishel

Puppet Version: 5.3.5 (and older)
Puppet Server Version: N/A
OS Name/Version: Centos/Redhat

The uninstall method in the rpm package provider is more specific than the package resource it is uninstalling, and uses a cache that can become out of date by the time it executes.

Desired Behavior:

Unconditionally uninstall a package when conditions are not specified.

Actual Behavior:

Example:

  package { 'cronie-anacron':
    ensure  => absent,
    require => Package['cronie-noanacron']
  }
 
  package { 'cronie-noanacron':
    ensure => installed,
  }

 

yum[3546]: Updated: cronie-anacron-1.4.11-19.el7.x86_64 
yum[3546]: Updated: cronie-1.4.11-19.el7.x86_64 
yum[3546]: Installed: cronie-noanacron-1.4.11-19.el7.x86_64
 
puppet-agent[1371]: (/Stage[main]/Package[cronie-noanacron]/ensure) created 
puppet-agent[1371]: Execution of '/usr/bin/rpm -e cronie-anacron-1.4.11-17.el7.x86_64' returned 1: error: package cronie-anacron-1.4.11-17.el7.x86_64 is not installed 
puppet-agent[1371]: (/Stage[main]/Package[cronie-anacron]/ensure) change from '1.4.11-17.el7' to 'absent' failed: Execution of '/usr/bin/rpm -e cronie-anacron-1.4.11-17.el7.x86_64' returned 1: error: package cronie-anacron-1.4.11-17.el7.x86_64 is not installed

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Thomas Kishel (JIRA)

unread,
Apr 17, 2018, 7:23:03 PM4/17/18
to puppe...@googlegroups.com
Thomas Kishel commented on Bug PUP-8664
 
Re: rpm package provider is too specific

Example-Specific Notes:

cronie-anacron can't be installed without installing cronie-noanacron first as an alternative.

By installing cronie-noanacron, cronie gets updated as a dependency:

# rpm -q --requires cronie-noanacron
cronie = 1.4.11-19.el7

 
That in turn updates cronie-anacron:
 

# rpm -q --requires cronie-anacron
cronie = 1.4.11-19.el7

 
So by the time the rpm -e command runs, the cache is no longer valid.

Thomas Kishel (JIRA)

unread,
Apr 17, 2018, 7:24:02 PM4/17/18
to puppe...@googlegroups.com
Thomas Kishel updated an issue
 
Change By: Thomas Kishel
Priority: Normal Minor

Thomas Kishel (JIRA)

unread,
Apr 17, 2018, 7:24:02 PM4/17/18
to puppe...@googlegroups.com
Thomas Kishel updated an issue
Change By: Thomas Kishel
Method Found: Needs Assessment Customer Feedback

Thomas Kishel (JIRA)

unread,
Apr 18, 2018, 11:24:09 AM4/18/18
to puppe...@googlegroups.com
Thomas Kishel updated an issue
*Puppet Version: 5.3.5 (and older)*
*Puppet Server Version: N/A*
*OS Name/Version: Centos/Redhat*


The uninstall method in the rpm package provider is more specific than the package resource it is uninstalling, and uses a cache that can become out of date by the time it executes.

*Desired Behavior:*


Unconditionally uninstall a package when conditions are not specified.

*Actual Behavior:*

Example:
{code:java}

  package { 'cronie-anacron':
    ensure  => absent,
    require => Package['cronie-noanacron']
  }

  package { 'cronie-noanacron':
    ensure => installed,
  }
{code}
 
{code:java}

yum[3546]: Updated: cronie-anacron-1.4.11-19.el7.x86_64
yum[3546]: Updated: cronie-1.4.11-19.el7.x86_64
yum[3546]: Installed: cronie-noanacron-1.4.11-19.el7.x86_64

puppet-agent[1371]: (/Stage[main]/Package[cronie-noanacron]/ensure) created
puppet-agent[1371]: Execution of '/usr/bin/rpm -e cronie-anacron-1.4.11-17.el7.x86_64' returned 1: error: package cronie-anacron-1.4.11-17.el7.x86_64 is not installed
puppet-agent[1371]: (/Stage[main]/Package[cronie-anacron]/ensure) change from '1.4.11-17.el7' to 'absent' failed: Execution of '/usr/bin/rpm -e cronie-anacron-1.4.11-17.el7.x86_64' returned 1: error: package cronie-anacron-1.4.11-17.el7.x86_64 is not installed
{code}

 To reset the test environment after that puppet run, download cronie-1.4.11-14.el7.x86_64.rpm and cronie-anacron-1.4.11-14.el7.x86_64.rpm and run:

{code:java}
rpm -e cronie cronie-noanacron crontabs ; yum install -y cronie-* ; rpm -qa | grep cron ; puppet agent -t ; rpm -qa | grep cron
{code}

Josh Cooper (JIRA)

unread,
Apr 30, 2018, 1:37:03 PM4/30/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Coremunity

Vadym Chepkov (JIRA)

unread,
May 13, 2018, 10:52:03 PM5/13/18
to puppe...@googlegroups.com
Vadym Chepkov commented on Bug PUP-8664
 
Re: rpm package provider is too specific

Another situation where 'caching' brings unexpected results. RHEL7 supplies subversion version 1.7, which is old and we were asked to upgrade it. Wandisco provides their version of RPMs, but without separating libraries into a different RPM, like RedHat does, so we have to force uninstalling subversion-libs package before installing packages from Wandisco. Here is the code:

  yumrepo { 'wandisco':
    baseurl     => "http://opensource.wandisco.com/rhel/\$releasever/svn-${version}/RPMS/\$basearch",
    descr       => 'Wandisco Subversion',
    gpgcheck    => '1',
    gpgkey      => 'http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco',
    includepkgs => 'mod_dav_svn serf libserf subversion*',
  }
 
  # RHEL library conflicts with wandisco binary
  package { 'subversion-libs':
    ensure => purged,
  }
 
  package { ['mod_dav_svn', 'subversion']:
    ensure  => latest,
    require => [Yumrepo['wandisco'],Package['subversion-libs']],
  }

To my big surprise, after puppet run I end up without mod_dav_svn or subversion of a any version.
Only second run will put proper packages back.

Thomas Kishel (JIRA)

unread,
May 14, 2018, 12:47:03 PM5/14/18
to puppe...@googlegroups.com
Thomas Kishel updated an issue
 
Change By: Thomas Kishel
CS Priority: Needs Priority

Adam Bottchen (JIRA)

unread,
May 15, 2018, 11:37:04 AM5/15/18
to puppe...@googlegroups.com
Adam Bottchen updated an issue
Change By: Adam Bottchen
Labels: cs_pr_review

Adam Bottchen (JIRA)

unread,
May 15, 2018, 11:42:04 AM5/15/18
to puppe...@googlegroups.com
Adam Bottchen updated an issue
Change By: Adam Bottchen
CS Priority: Needs Priority Normal
CS Impact: The rpm provider should allow for a single run to ensure absent one package and ensure present another.  The fact this fails in any case is a bug worth fixing.  

There is already a PR attached.
CS Severity: 3 - Serious
CS Business Value: 3 - $$$$
CS Frequency: 1 - 1-5% of Customers

Josh Cooper (JIRA)

unread,
Sep 26, 2018, 9:50:04 PM9/26/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Coremunity Platform OS

Branan Riley (JIRA)

unread,
Mar 25, 2019, 5:10:03 AM3/25/19
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Sprint: PR - Triage

Branan Riley (JIRA)

unread,
Mar 25, 2019, 5:10:04 AM3/25/19
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Team: Platform OS Puppet Romania

Mihai Buzgau (JIRA)

unread,
Mar 27, 2019, 6:29:02 AM3/27/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Story Points: 1

Mihai Buzgau (JIRA)

unread,
Mar 27, 2019, 6:29:03 AM3/27/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - Triage 2019-04-03

Mihai Buzgau (JIRA)

unread,
Apr 3, 2019, 5:38:07 AM4/3/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-04-03 , PR - 2019-04-17

Sebastian Miclea (JIRA)

unread,
Apr 8, 2019, 7:27:03 AM4/8/19
to puppe...@googlegroups.com
Sebastian Miclea assigned an issue to Sebastian Miclea
Change By: Sebastian Miclea
Assignee: Sebastian Miclea

Mihai Buzgau (JIRA)

unread,
Apr 17, 2019, 5:35:10 AM4/17/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-04-03, PR - 2019-04-17 , PR - 2019-05-02

Mihai Buzgau (JIRA)

unread,
May 2, 2019, 5:21:09 AM5/2/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-04-03, PR - 2019-04-17, PR - 2019-05-02 , PR - 2019-05-15

Oana Tanasoiu (JIRA)

unread,
Jun 10, 2019, 3:07:04 AM6/10/19
to puppe...@googlegroups.com
Oana Tanasoiu updated an issue
Change By: Oana Tanasoiu
Fix Version/s: PUP 6.5.0

Heston Hoffman (JIRA)

unread,
Jun 12, 2019, 2:12:03 PM6/12/19
to puppe...@googlegroups.com
Heston Hoffman updated an issue
Change By: Heston Hoffman
Labels: cs_pr_review resolved-issue-added

Gheorghe Popescu (JIRA)

unread,
Jul 3, 2019, 4:42:02 AM7/3/19
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Fix Version/s: PUP 6.4.3
Fix Version/s: PUP 6.0.10
Fix Version/s: PUP 5.5.15
Reply all
Reply to author
Forward
0 new messages