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

Yum provider "purge" target runs irrespective of package installation status

    Details

    • Template:
    • Story Points:
      1
    • Sprint:
      Client 2015-05-27
    • Release Notes:
      Bug Fix

      Description

      It seems the yum provider will try to purge an absent package:

      [root@test ~]# cat test.pp 
      package { logwatch: ensure => purged; }
       
      [root@test ~]# /bin/rpm -q logwatch --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'
      package logwatch is not installed
       
      [root@test ~]# puppet -d -v test.pp 
      debug: Puppet::Type::Package::ProviderRpm: Executing '/bin/rpm --version'
      debug: Puppet::Type::Package::ProviderUrpmi: Executing '/bin/rpm -ql rpm'
      debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm --version'
      debug: Puppet::Type::Package::ProviderAptrpm: Executing '/bin/rpm -ql rpm'
      debug: Puppet::Type::Package::ProviderPorts: file /usr/local/sbin/portupgrade does not exist
      debug: Puppet::Type::Package::ProviderAptitude: file /usr/bin/aptitude does not exist
      debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
      debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox does not exist
      debug: Puppet::Type::Package::ProviderApt: file /usr/bin/apt-get does not exist
      debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does not exist
      debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
      debug: Puppet::Type::Package::ProviderDpkg: file /usr/bin/dpkg does not exist
      debug: Puppet::Type::Package::ProviderSun: file /usr/sbin/pkgrm does not exist
      debug: Puppet::Type::Package::ProviderAptrpm: file apt-get does not exist
      debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
      debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swremove does not exist
      debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
      debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info does not exist
      debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not exist
      debug: Creating default schedules
      debug: Failed to load library 'selinux' for feature 'selinux'
      debug: Puppet::Type::User::ProviderLdap: true value when expecting false
      debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
      debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist
      debug: Puppet::Type::User::ProviderPw: file pw does not exist
      debug: Failed to load library 'ldap' for feature 'ldap'
      debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl]
      debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
      debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
      debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl]
      debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
      debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
      debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
      debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl]
      debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
      debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
      debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/puppet/ssl]
      debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state]
      debug: /File[/var/lib/puppet/ssl/certs/test.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
      debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state]
      debug: /File[/var/lib/puppet/ssl/public_keys/test.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys]
      debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl]
      debug: /File[/var/lib/puppet/ssl/private_keys/test.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys]
      debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
      debug: Finishing transaction 23973287885200 with 0 changes
      debug: Prefetching yum resources for package
      debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm --version'
      debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}
      ''
      info: Applying configuration version '1272893121'
      debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q logwatch --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}
      '
      debug: //Package[logwatch]: Changing ensure
      debug: //Package[logwatch]: 1 change(s)
      debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -y erase logwatch'
      notice: //Package[logwatch]/ensure: created
      debug: Finishing transaction 23456258088960 with 1 changes
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  redmine.exporter redmine.exporter
                  QA Contact:
                  Eric Thompson
                • Votes:
                  9 Vote for this issue
                  Watchers:
                  21 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: