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

Yum package arch and version ensuring failing

    XMLWordPrintable

    Details

    • Template:
    • Story Points:
      2
    • Sprint:
      Client 2016-05-04, Client 2016-05-18

      Description

      After lots of trial and error I found a bug in our current Puppet version

      Having a package line like so:

       package { "firefox.x86_64": ensure => "3.0.12-1.el5.centos", require => Package["xulrunner.x86_64"] }
      

      Would fail with debug output:

      *_
      debug: //Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox.x86_64]: Changing ensure
      debug: //Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox.x86_64]: 1 change(s)
      debug: Package[firefox.x86_64](provider=yum): Ensuring => 3.0.12-1.el5.centos
      debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -d 0 -e 0 -y install firefox.x86_64-3.0.12-1.el5.centos'
      debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q firefox.x86_64 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE}
      %{ARCH}
      '
      err: //Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox.x86_64]/ensure: change from absent to 3.0.12-1.el5.centos failed: Could
       not update: Could not find package firefox.x86_64 at /etc/puppet/manifests/CentOS.pp:149_*
      

      It didn't matter if I listed ver-release or just ver, same sort of error; it appends the version-[release] to the package name and arch. Which obviously fails as yum packages must be referred to like so:

                name
                name.arch
                name-ver
                name-ver-rel
                name-ver-rel.arch
                name-epoch:ver-rel.arch
                epoch:name-ver-rel.arch
      

      So if I omitted the arch and changed the line to:

       package { "firefox": ensure => "3.0.12-1.el5.centos", require => Package["xulrunner.x86_64"] }
      

      We would have more success with the 64bit version but it would try and bring the 32bit Firefox version too along with its dependencies. Not what I wanted.

      *_debug: Package[firefox](provider=yum): Ensuring => 3.0.12-1.el5.centos.x86_64
      debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -d 0 -e 0 -y install firefox-3.0.12-1.el5.centos.x86_64'
      debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q firefox --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}
      '
      err: //Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox]/ensure: change from 3.0.12-1.el5.centos to 3.0.12-1.el5.centos.x86_64 failed: Could not update: Failed to update to version 3.0.12-1.el5.centos.x86_64, got version 3.0.12-1.el5.centos instead at /etc/puppet/manifests/CentOS.pp:149_*
      

      So chatting on IRC and more trial and error I found this is the only way to get it to work:

       package { "firefox-3.0.12-1.el5.centos.x86_64": ensure => "present", require => Package["xulrunner.x86_64"] }
      

      So this side-steps puppets version management though.

      This may be fixed in a newer version. I haven't tried yet.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              redmine.exporter redmine.exporter
              QA Contact:
              Narmadha Perumal Narmadha Perumal
              Votes:
              4 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support