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

Audit Windows::Error.new for additional eaten exceptions

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Ready for Engineering
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: PUP 4.3.2
    • Fix Version/s: PUP 5.y
    • Component/s: None
    • Labels:
      None
    • Template:
    • Epic Link:
    • Team:
      Coremunity
    • Story Points:
      1

      Description

      In PUP-6025 it was discovered that we've been silently and expensively eating instances of Windows::Error being thrown, that were failing because a Windows API is being used incorrectly. Since this was discovered accidentally, I think it makes sense to do a quick audit, by instrumenting the code with some rudimentary logging, to see if there are other cases like this.

      The instrumentation doesn't need to be much more complex than adding something like this to the initializer of the class at https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/windows/error.rb#L16:

      open('c:/win-error.txt', 'a') { |f| f << "#{@code}: #{message}\n" }
      

      Further exploration could add the callers details so we have a better idea of where the errors are originating to see if there are any patterns.

      The net result of this ticket should be new tickets.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              ethan Ethan Brown
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support