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

Catch yum stacktraces in yum-helper.py

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.8.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:

      Description

      python /usr/share/ruby/vendor_ruby/puppet/provider/package/yumhelper.py

      can produces ugly stack traces which are also caught by abrt...

      Given these are normally just transient errors it would be good to catch these
      as yum does.

      Steps to reproduce:

      1. Vandalize a yum reposiotry metadata file e.g enter a non-existent hostname.

      [myrepo]
      baseurl=http://notexisting.example.org/
      

      2. Run yumhelper as puppet does, this results in

      # python /usr/share/ruby/vendor_ruby/puppet/provider/package/yumhelper.py 
      Loaded plugins: fastestmirror, kernel-module, priorities, rpm-warm-cache,
                    : versionlock
      Traceback (most recent call last):
        File "/usr/share/ruby/vendor_ruby/puppet/provider/package/yumhelper.py", line 145, in <module>
          ypl = pkg_lists(my)
        File "/usr/share/ruby/vendor_ruby/puppet/provider/package/yumhelper.py", line 69, in pkg_lists
          return my.doPackageLists('updates')
        File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2956, in doPackageLists
          for (n,a,e,v,r) in self.up.getUpdatesList():
      

      which is very ugly when compared to say yum itself:

      # yum repolist
      Loaded plugins: changelog, fastestmirror, kernel-module, priorities, rpm-warm-cache, tsflags, versionlock
      http://nosuchhost.example.org/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: shit; Name or service not known"
      Trying other mirror.
      http://nosuchhost.example.org/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: shit; Name or service not known"
      

      It would be good to catch these errors in python land.

      To reproduce within full puppet run have a manifest

      package{'whatever':
        ensure => latest
      

      and vandalize the yum repository definitions.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              traylenator Steve Traylen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support