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

Add error handing to Yum provider

    XMLWordPrintable

Details

    • Minor
    • 1 - 1-5% of Customers
    • 2 - Annoyance
    • 3 - $$$$
    • Hide
      Having the first agent run report failure on every new agent is annoying. It's unclear if the entire run fails, which could be a slowdown to provisioning processes, forcing the user to either rerun puppet manually or wait 30 minutes for the node to get a successful run.

      This seems like a very simple thing to fix.
      Show
      Having the first agent run report failure on every new agent is annoying. It's unclear if the entire run fails, which could be a slowdown to provisioning processes, forcing the user to either rerun puppet manually or wait 30 minutes for the node to get a successful run. This seems like a very simple thing to fix.
    • Bug Fix
    • Hide
      Yumrepo was attempting to stat non-existent repo files in the case that a repo file was deleted and was not being managed by a yumrepo resource. This would cause an error on the first attempt at a puppet run. Yumrepo now checks to ensure the file exists before attempting to stat.
      Show
      Yumrepo was attempting to stat non-existent repo files in the case that a repo file was deleted and was not being managed by a yumrepo resource. This would cause an error on the first attempt at a puppet run. Yumrepo now checks to ensure the file exists before attempting to stat.
    • Needs Assessment

    Description

      When updating a yumrepo resource, yumrepo/inifile.rb blindly attempts to stat a list of files previously collected, with no error handling.
      This results in ruby errors like "No such file or directory @ rb_file_s_stat - /etc/yum.repos.d/potato.repo" if the list of files is out of date, and obviously resource failures.
      This can happen if /etc/yum.repos.d is managed + purged, or yum a plug-in decides to remove a file etc.
      Currently we're seeing the first agent run fail on every newly provisioned host because of this.

      There is pretty simple fix, wrap the stat in an 'if Puppet::FileSystem.exist?(file)' to check if the file actually exists before trying to stat it.
      See https://github.com/puppetlabs/puppet/compare/master...jsmall3:jsmall3-yumrepo-store

      Attachments

        Activity

          People

            jorie Jorie Tappa
            kael Kael Oisinson
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support