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

Puppet::Util::Log requires a message

    Details

    • Template:
    • Epic Link:
    • Team:
      Coremunity
    • Sprint:
      Platform Core KANBAN
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Puppet will provide a minimal log message, instead of no log message and an uninformative error, if there are certain errors during sync.

      Description

      When trying to add holdable support to the yum package provider under PUP-958, the following error is being thrown when attempting to catch an exception invoking 'provider.hold'.

      $ sudo bundle exec puppet resource package bash ensure=held --trace
      Error: /Package[bash]: Could not evaluate: Puppet::Util::Log requires a message
      /mnt/data/Puppet/lib/puppet/util/log.rb:298:in `message='
      /mnt/data/Puppet/lib/puppet/util/log.rb:247:in `initialize'
      /mnt/data/Puppet/lib/puppet/util/log.rb:84:in `new'
      /mnt/data/Puppet/lib/puppet/util/log.rb:84:in `create'
      /mnt/data/Puppet/lib/puppet/util/logging.rb:8:in `send_log'
      /mnt/data/Puppet/lib/puppet/transaction/event.rb:78:in `send_log'
      /mnt/data/Puppet/lib/puppet/transaction/resource_harness.rb:154:in `ensure in sync_if_needed'
      /mnt/data/Puppet/lib/puppet/transaction/resource_harness.rb:155:in `sync_if_needed'
      /mnt/data/Puppet/lib/puppet/transaction/resource_harness.rb:107:in `manage_via_ensure_if_possible'
      /mnt/data/Puppet/lib/puppet/transaction/resource_harness.rb:77:in `perform_changes'
      /mnt/data/Puppet/lib/puppet/transaction/resource_harness.rb:18:in `evaluate'
      /mnt/data/Puppet/lib/puppet/transaction.rb:174:in `apply'
      /mnt/data/Puppet/lib/puppet/transaction.rb:187:in `eval_resource'
      /mnt/data/Puppet/lib/puppet/transaction.rb:117:in `call'
      /mnt/data/Puppet/lib/puppet/transaction.rb:117:in `block (2 levels) in evaluate'
      /mnt/data/Puppet/lib/puppet/util.rb:327:in `block in thinmark'
      /usr/share/ruby/benchmark.rb:296:in `realtime'
      /mnt/data/Puppet/lib/puppet/util.rb:326:in `thinmark'
      /mnt/data/Puppet/lib/puppet/transaction.rb:117:in `block in evaluate'
      /mnt/data/Puppet/lib/puppet/graph/relationship_graph.rb:118:in `traverse'
      /mnt/data/Puppet/lib/puppet/transaction.rb:108:in `evaluate'
      /mnt/data/Puppet/lib/puppet/resource/catalog.rb:164:in `block in apply'
      /mnt/data/Puppet/lib/puppet/util/log.rb:153:in `with_destination'
      /mnt/data/Puppet/lib/puppet/transaction/report.rb:107:in `as_logging_destination'
      /mnt/data/Puppet/lib/puppet/resource/catalog.rb:163:in `apply'
      /mnt/data/Puppet/lib/puppet/indirector/resource/ral.rb:41:in `save'
      /mnt/data/Puppet/lib/puppet/indirector/indirection.rb:283:in `save'
      /mnt/data/Puppet/lib/puppet/application/resource.rb:219:in `find_or_save_resources'
      /mnt/data/Puppet/lib/puppet/application/resource.rb:143:in `main'
      /mnt/data/Puppet/lib/puppet/application.rb:376:in `run_command'
      /mnt/data/Puppet/lib/puppet/application.rb:367:in `block (3 levels) in run'
      /mnt/data/Puppet/lib/puppet/application.rb:474:in `plugin_hook'
      /mnt/data/Puppet/lib/puppet/application.rb:367:in `block (2 levels) in run'
      /mnt/data/Puppet/lib/puppet/util.rb:479:in `exit_on_fail'
      /mnt/data/Puppet/lib/puppet/application.rb:367:in `block in run'
      /mnt/data/Puppet/lib/puppet/context.rb:51:in `override'
      /mnt/data/Puppet/lib/puppet.rb:224:in `override'
      /mnt/data/Puppet/lib/puppet/application.rb:357:in `run'
      /mnt/data/Puppet/lib/puppet/util/command_line.rb:137:in `run'
      /mnt/data/Puppet/lib/puppet/util/command_line.rb:91:in `execute'
      /mnt/data/Puppet/bin/puppet:4:in `<top (required)>'
      /usr/local/share/gems/bin/puppet:23:in `load'
      /usr/local/share/gems/bin/puppet:23:in `<main>'
      package { 'bash':
        ensure => '4.2.45-1.fc19',
      }
      

      This is with the following patch applied:
      Edit: Added patch as attachment as formatting was breaking it.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  kris.bosland Kris Bosland
                  Reporter:
                  fatmcgav Gavin Williams
                  QA Contact:
                  Narmadha Perumal
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: