Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-1014

Puppetserver ignores custom reports

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Duplicate
    • SERVER 2.2.0
    • None
    • Puppet Server
    • Debian Wheezy with the Puppetserver 2.2.0, Puppet Agent 1.3.0 packages from the Puppetlabs APT repository. Puppetserver and Agent are running on the same host.

    Description

      I am trying to write a custom report but the code doesn't seem to be picked up by the Puppetserver (2.2.0). Following https://puppetlabs.com/blog/when-puppet-reports-part-2 I have written a small module with a dummy report that only writes out a single line to the server log. The module is available at https://github.com/smoeding/puppet-foobar

      First environment: Puppet 3.6.2, Debian Wheezy

      • Install module foobar
      • Verify parameters in puppet.conf: pluginsync=true, reports=foobar
      • Start the puppetmaster
      • Run puppet agent -t
      • Observe the creation of /var/lib/puppet/lib/puppet/reports/foobar.rb

      The logfile shows a successful call to the report (last line):

      Info: Caching node for xxx
      Info: Caching node for xxx
      Notice: Compiled catalog for xxx in environment production in 9.54 seconds
      Info: Puppet run on xxx ended with status unchanged
      

      So the report code seems to be working in this environment.

      Second Environment: Puppetserver 2.2.0, Puppet-Agent 1.3.0, Debian Wheezy

      • Install module foobar
      • Verify parameters in puppet.conf: pluginsync=true, reports=foobar
      • Start the puppetmaster
      • Run puppet agent -t
      • Observe creation of /opt/puppetlabs/puppet/cache/lib/puppet/reports/foobar.rb

      The logfile /var/log/puppetlabs/puppetserver/puppetserver.log only contains:

      2015-11-25 18:49:12,105 WARN  [qtp559733227-62] [puppet-server] Puppet No report named 'foobar'
      

      So the report is configured but obviously not registed in the server. Restarting the Puppetserver does not change that situation and the warning remains.

      When I manually copy the file foobar.rb to
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/reports (where the standard report files http.rb, log.rb and store.rb reside), then the report suddenly works:

      2015-11-25 19:04:14,042 INFO  [qtp1605533662-61] [puppet-server] Puppet Puppet run on yyy ended with status unchanged
      

      It seems to me as if the documented way of writing a custom report as part of a module does not cause the new Puppetserver to pick up the deployed code and execute the report. Other code in modules (custom facts, types & providers) works the expected way.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stm Stefan Möding
              Erik Dasher Erik Dasher
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support