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

Puppet help silently exits when an application fails to load

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.6.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Client 2016-07-27
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      fix a problem where `puppet help` face-based application could silently fail when trying to display help for each installed application

      Description

      The help face-based application only rescues Puppet::Errors when trying to display help for each installed application. If an application, e.g. from a module, has a dependency on a gem that is not installed, then puppet help silently exits with 1:

      0 ~/work/puppet (master)  $ be puppet module install msopentech-windowsazure
      Notice: Preparing to install into /Users/josh/.puppet/modules ...
      Notice: Downloading from https://forge.puppetlabs.com ...
      Notice: Installing -- do not interrupt ...
      /Users/josh/.puppet/modules
      └── msopentech-windowsazure (v1.1.1)
      0 ~/work/puppet (master)  $ be puppet help
      1 ~/work/puppet (master)  $
      

      Something like this seems to fix the problem, though faces seems to only rescue Puppet::Errors in other places as well:

      diff --git a/lib/puppet/face/help.rb b/lib/puppet/face/help.rb
      index 44380ab..713d57e 100644
      — a/lib/puppet/face/help.rb
      +++ b/lib/puppet/face/help.rb
      @@ -140,7 +140,9 @@ Detail: "#{detail.message}"
      begin
      face = Puppet::Face[appname, :current]
      result << [appname, face.summary]
      rescue Puppet::Error
      + rescue SystemExit,NoMemoryError
      + raise
      + rescue Exception => e
      result << [ "! # {appname}
      ", "! Subcommand unavailable due to error. Check error logs."
      end
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  josh Josh Cooper
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: