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

Puppet::Error raised by an indirector save method is silent

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.2.2
    • Fix Version/s: PUP 4.2.3
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Client 2015-10-14
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Previously an exception raised by an indirector save method didn't log, so code that exits on exception would not get anything logged. This change ensures that an exception in this case is logged.

      Description

      When the PuppetDB raises a Puppet::Error during catalog save (for example here: https://github.com/puppetlabs/puppetdb/blob/3.1.1/puppet/lib/puppet/indirector/catalog/puppetdb.rb#L326) it is silently dropped by the apply application here: https://github.com/puppetlabs/puppet/blob/4.2.2/lib/puppet/application/apply.rb#L257-L260

      This leads to a silent exit where no clue what the error is is given to the user.

      I think a decent solution would be to add an exception handler to the indirector caching that logs exceptions (and doesn't abort if they happen as caching failure shouldn't be critical). That would be here: https://github.com/puppetlabs/puppet/blob/4.2.2/lib/puppet/indirector/indirection.rb#L199

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                john.duarte John Duarte
                Reporter:
                dalen Erik Dalén
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: