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

yum provider calls rpm for each managed multiarch package

    XMLWordPrintable

    Details

    • Template:
    • Team:
      Night's Watch

      Description

      When managing packages with package/yum, the provider calls rpm for each package, even if nothing has changed and the provider's cache should be hot.

      With a handful of packages this is not really a problem, but at a client's site we have added 1200 packages, which translates into approx. three minutes runtime just for checking the current state.

      I've added a debug statement to lib/puppet/provider/package/rpm.rb and puppet agent --test --evaltrace --debug shows this:

      Debug: Prefetching yum resources for package
      Debug: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n''
      Info: /Stage[main]/Package[xorg-x11-drv-elographics.x86_64]: Starting to evaluate the resource
      Debug: Executing '/bin/rpm -q xorg-x11-drv-elographics.x86_64 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
      /usr/lib/ruby/site_ruby/1.8/puppet/provider/package/rpm.rb:87:in `query'
      /usr/lib/ruby/site_ruby/1.8/puppet/provider/package.rb:19:in `properties'
      /usr/lib/ruby/site_ruby/1.8/puppet/type/package.rb:184:in `retrieve'
      /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1048:in `retrieve'
      /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1076:in `retrieve_resource'
      /usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:236:in `from_resource'
      /usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:19:in `evaluate'
      /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:204:in `apply'
      /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:217:in `eval_resource'
      /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `call'
      /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `evaluate'
      /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:327:in `thinmark'
      /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
      /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:326:in `thinmark'
      

      This seems to be a longstanding problem, as 3.1.1 has the same behaviour. I believe this was introduced with redmine#1243.

      I do not understand why the preloading in `instances` doesn't work.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              DavidSchmitt Old Dasz
              QA Contact:
              Eric Thompson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support