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

Puppet Logging - `format_exception': undefined method `message' for #<Array:0x7f40783b5848> (NoMethodError)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 3.5.0
    • Fix Version/s: None
    • Component/s: Types and Providers
    • Labels:
      None
    • Template:

      Description

      When trying to test some tweaks to support PUP-958, an issue has been encountered whereby Puppet is throwing the following error:

      sudo bundle exec puppet resource package bash ensure=held
      /home/vagrant/puppet/lib/puppet/util/logging.rb:34:in `format_exception': undefined method `message' for #<Array:0x7f40783b5848> (NoMethodError)
              from /home/vagrant/puppet/lib/puppet/util/logging.rb:46:in `format_exception'
              from /home/vagrant/puppet/lib/puppet/util/logging.rb:27:in `log_exception'
              from /home/vagrant/puppet/lib/puppet/util.rb:491:in `exit_on_fail'
              from /home/vagrant/puppet/lib/puppet/application.rb:367:in `run'
              from /home/vagrant/puppet/lib/puppet/context.rb:51:in `override'
              from /home/vagrant/puppet/lib/puppet.rb:224:in `override'
              from /home/vagrant/puppet/lib/puppet/application.rb:357:in `run'
              from /home/vagrant/puppet/lib/puppet/util/command_line.rb:137:in `run'
              from /home/vagrant/puppet/lib/puppet/util/command_line.rb:91:in `execute'
              from /home/vagrant/puppet/bin/puppet:4
              from /usr/lib/ruby/gems/1.8/bin/puppet:19:in `load'
              from /usr/lib/ruby/gems/1.8/bin/puppet:19
      

      This is with the attached lib_puppet_type_package_rb-2.diff patch applied.

      If I then apply the attached lib_puppet_util_rb.diff patch, which enables some additional logging, I get the following exception:

      puppet]$ sudo bundle exec puppet resource package bash ensure=held
      #<Puppet::ResourceError: Parameter ensure failed on Package[bash]: Provider must have features 'holdable' to set 'ensure' to 'held' Provider must have features 'holdable' to set 'ensure' to 'held'>
      /home/vagrant/puppet/lib/puppet/util/errors.rb:104:in `fail'
      /home/vagrant/puppet/lib/puppet/parameter.rb:467:in `validate'
      /home/vagrant/puppet/lib/puppet/property.rb:563:in `should='
      /home/vagrant/puppet/lib/puppet/property.rb:563:in `each'
      /home/vagrant/puppet/lib/puppet/property.rb:563:in `should='
      /home/vagrant/puppet/lib/puppet/property.rb:615:in `value='
      /home/vagrant/puppet/lib/puppet/type.rb:653:in `[]='
      /home/vagrant/puppet/lib/puppet/type.rb:2242:in `set_parameters'
      /home/vagrant/puppet/lib/puppet/type.rb:2236:in `each'
      /home/vagrant/puppet/lib/puppet/type.rb:2236:in `set_parameters'
      /home/vagrant/puppet/lib/puppet/type.rb:2192:in `initialize'
      /home/vagrant/puppet/lib/puppet/resource.rb:307:in `new'
      /home/vagrant/puppet/lib/puppet/resource.rb:307:in `to_ral'
      /home/vagrant/puppet/lib/puppet/indirector/resource/ral.rb:37:in `save'
      /home/vagrant/puppet/lib/puppet/indirector/indirection.rb:283:in `save'
      /home/vagrant/puppet/lib/puppet/application/resource.rb:219:in `find_or_save_resources'
      /home/vagrant/puppet/lib/puppet/application/resource.rb:143:in `main'
      /home/vagrant/puppet/lib/puppet/application.rb:376:in `run_command'
      /home/vagrant/puppet/lib/puppet/application.rb:367:in `run'
      /home/vagrant/puppet/lib/puppet/application.rb:474:in `plugin_hook'
      /home/vagrant/puppet/lib/puppet/application.rb:367:in `run'
      /home/vagrant/puppet/lib/puppet/util.rb:479:in `exit_on_fail'
      /home/vagrant/puppet/lib/puppet/application.rb:367:in `run'
      /home/vagrant/puppet/lib/puppet/context.rb:51:in `override'
      /home/vagrant/puppet/lib/puppet.rb:224:in `override'
      /home/vagrant/puppet/lib/puppet/application.rb:357:in `run'
      /home/vagrant/puppet/lib/puppet/util/command_line.rb:137:in `run'
      /home/vagrant/puppet/lib/puppet/util/command_line.rb:91:in `execute'
      /home/vagrant/puppet/bin/puppet:4
      /usr/lib/ruby/gems/1.8/bin/puppet:19:in `load'
      /usr/lib/ruby/gems/1.8/bin/puppet:19
      /home/vagrant/puppet/lib/puppet/util/logging.rb:34:in `format_exception': undefined method `message' for #<Array:0x7f4effb0d650> (NoMethodError)
              from /home/vagrant/puppet/lib/puppet/util/logging.rb:46:in `format_exception'
              from /home/vagrant/puppet/lib/puppet/util/logging.rb:27:in `log_exception'
              from /home/vagrant/puppet/lib/puppet/util.rb:491:in `exit_on_fail'
              from /home/vagrant/puppet/lib/puppet/application.rb:367:in `run'
              from /home/vagrant/puppet/lib/puppet/context.rb:51:in `override'
              from /home/vagrant/puppet/lib/puppet.rb:224:in `override'
              from /home/vagrant/puppet/lib/puppet/application.rb:357:in `run'
              from /home/vagrant/puppet/lib/puppet/util/command_line.rb:137:in `run'
              from /home/vagrant/puppet/lib/puppet/util/command_line.rb:91:in `execute'
              from /home/vagrant/puppet/bin/puppet:4
              from /usr/lib/ruby/gems/1.8/bin/puppet:19:in `load'
              from /usr/lib/ruby/gems/1.8/bin/puppet:19
      

      This would suggest that the ResourceError is being correctly thrown, but then a further error is causing the exception as seen above.

      Having discussed this with Adrien Thebo, he's suggested this might be a cascading error of some description.

      Let me know if you require further info.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  kylo Kylo Ginsberg
                  Reporter:
                  fatmcgav Gavin Williams
                  QA Contact:
                  Narmadha Perumal
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: