Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7214

PUP-6663 causes a regression of PUP-535

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: PUP 4.9.0
    • Fix Version/s: PUP 4.9.3
    • Component/s: Types and Providers
    • Labels:
    • Environment:

      Beaker puppet-agent 1.9.1

    • Template:
    • Team:
      Agent
    • Story Points:
      1
    • Sprint:
      AP 2017-03-08
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Fixes a regression (introduced in Puppet 4.9.0) affecting RPM package deinstallation.
    • QA Risk Assessment:
      Automate
    • QA Risk Assessment Reason:
      Regression we need a test for this

      Description

      As exemplified in the output of the two beaker runs here: https://gitlab.com/simp/pupmod-simp-rsync/pipelines/6452666, one with agent 1.7.1 and one with agent 1.9.1, when attempting to execute the following manifest:

      package { 'rsyslog.x86_64': ensure => absent, provider => rpm }
      

      when you attempt to run on a rhel7 vm:

      Error: Execution of '/bin/rpm -e --nodeps 'rsyslog-5.8.10-10.el6_6.x86_64' returned 1: error: package 'rsyslog-5.8.10-10.el6_6.x86_64 is not installed
        Error: /Stage[main]/Rsyslog::Install/Package[rsyslog.x86_64]/ensure: change from 5.8.10-10.el6_6 to absent failed: Execution of '/bin/rpm -e --nodeps 'rsyslog-5.8.10-10.el6_6.x86_64' returned 1: error: package 'rsyslog-5.8.10-10.el6_6.x86_64 is not installed
        Notice: /Stage[main]/Rsyslog::Install/Package[rsyslog7.x86_64]: Dependency Package[rsyslog.x86_64] has failures: true
      

      when running a debugging session, I can confirm the error is during the self.class.nevra_to_hash(output) on line 124:

      [2] pry(#<Puppet::Type::Package::ProviderYum>)> output
      => "'rsyslog 0 7.4.7 16.el7 x86_64\n'"
      [3] pry(#<Puppet::Type::Package::ProviderYum>)> self.class.nevra_to_hash(output)
      => {:name=>"'rsyslog", :epoch=>"0", :version=>"7.4.7", :release=>"16.el7", :arch=>"x86_64", :provider=>:yum, :ensure=>"7.4.7-16.el7"}
      [4] pry(#<Puppet::Type::Package::ProviderYum>)>
      

      This seems to have been introduced in PUP-6663 where single quotes were added around the version.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              d.cochran Dylan Cochran
              QA Contact:
              Eric Delaney
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support