diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2011-07-25 13:06:02 -0700 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2011-07-25 13:06:02 -0700 |
| commit | c7361629dff08d506209f806f0d903a0e968da06 (patch) | |
| tree | 445822533e15cd0e9e081440852ac4cef0f35458 /lib/puppet | |
| parent | 69acbb026145f7c5042cbb32ea0fbcfe88865897 (diff) | |
| parent | 89c021cac52a4bdecbe490772cb73cef9ef049c5 (diff) | |
| download | puppet-c7361629dff08d506209f806f0d903a0e968da06.tar.gz puppet-c7361629dff08d506209f806f0d903a0e968da06.tar.xz puppet-c7361629dff08d506209f806f0d903a0e968da06.zip | |
Merge branch 'ticket/2.6.x/8418-inspect_respect_run_mode' into 2.6.x
* ticket/2.6.x/8418-inspect_respect_run_mode:
(#8418) Fix inspect app to have the correct run_mode
maint: Adding logging to include environment when source fails
maint: Add debug logging when the master receives a report
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/application/inspect.rb | 7 | ||||
| -rw-r--r-- | lib/puppet/indirector/report/processor.rb | 2 | ||||
| -rwxr-xr-x | lib/puppet/type/file/source.rb | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/lib/puppet/application/inspect.rb b/lib/puppet/application/inspect.rb index ce32c661c..2260feed7 100644 --- a/lib/puppet/application/inspect.rb +++ b/lib/puppet/application/inspect.rb @@ -1,6 +1,4 @@ -require 'puppet' require 'puppet/application' -require 'puppet/file_bucket/dipper' class Puppet::Application::Inspect < Puppet::Application @@ -97,6 +95,11 @@ Licensed under the GNU General Public License version 2 Puppet::Resource::Catalog.terminus_class = :yaml end + def preinit + require 'puppet' + require 'puppet/file_bucket/dipper' + end + def run_command benchmark(:notice, "Finished inspection") do retrieval_starttime = Time.now diff --git a/lib/puppet/indirector/report/processor.rb b/lib/puppet/indirector/report/processor.rb index 88fe4b487..81b379eb8 100644 --- a/lib/puppet/indirector/report/processor.rb +++ b/lib/puppet/indirector/report/processor.rb @@ -20,9 +20,11 @@ class Puppet::Transaction::Report::Processor < Puppet::Indirector::Code # LAK:NOTE This isn't necessarily the best design, but it's backward # compatible and that's good enough for now. def process(report) + Puppet.debug "Recieved report to process from #{report.host}" return if Puppet[:reports] == "none" reports.each do |name| + Puppet.debug "Processing report from #{report.host} with processor #{name}" if mod = Puppet::Reports.report(name) # We have to use a dup because we're including a module in the # report. diff --git a/lib/puppet/type/file/source.rb b/lib/puppet/type/file/source.rb index 6ebec51fe..2fb65bbad 100755 --- a/lib/puppet/type/file/source.rb +++ b/lib/puppet/type/file/source.rb @@ -154,7 +154,7 @@ module Puppet fail detail, "Could not retrieve file metadata for #{source}: #{detail}" end end - fail "Could not retrieve information from source(s) #{value.join(", ")}" unless result + fail "Could not retrieve information from environment #{Puppet[:environment]} source(s) #{value.join(", ")}" unless result result end |
