Jira (PDB-106) Report processor in puppetdb-terminus fails if report has no metrics
Title: Message Title Jason Antman commented on an issue Re: Report processor in puppetdb-terminus fails if report has no metrics Confirmed that the Report Format 4 specification clearly says "Failed reports contain no metrics." so... the report processor just errors out for any failed report... Add Comment PuppetDB / PDB-106 Report processor in puppetdb-terminus fails if report has no metrics Sample content: {code} node "puppetdb1.vm" { somesyntaxerror } {code} When the report submitter tries to submit such a report, we get: {{Feb 18 19:15:31 puppetdb1 puppet-master[28878]: Report processor failed: undefined method `[]' for nil:NilClass}} On the puppetmaster ... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https:
Jira (PDB-106) Report processor in puppetdb-terminus fails if report has no metrics
Title: Message Title Jason Antman commented on an issue Re: Report processor in puppetdb-terminus fails if report has no metrics I updated the Issue summary to reflect what seems to be the root cause... if a puppet run terminates early (or does not have a valid catalog), the report sent back has an empty metrics hash (i.e. "- metrics: {}"). The current report processor dies on this. Relevant portion of the traceback: Error: Report processor failed: undefined method `[]' for nil:NilClass /usr/lib/ruby/site_ruby/1.8/puppet/reports/puppetdb.rb:81:in `run_duration' /usr/lib/ruby/site_ruby/1.8/puppet/reports/puppetdb.rb:50:in `report_to_hash' /usr/lib/ruby/site_ruby/1.8/puppet/reports/puppetdb.rb:19:in `process' Code in question: def run_duration long comment here metrics["time"]["total"] end Seems to me like we should be checking whether that value exists or not, and if not, ignoring it (or returning some special value?) Add Comment PuppetDB / PDB-106 Report processor in puppetdb-terminus fails if report has no metrics Sample content: {code} node "puppetdb1.vm" { somesyntaxerror } {code} When the report submitter tries to submit such a report, we get: {{Feb 18 19:15:31 puppetdb1 puppet-master[28878]: Report processor failed: undefined method `[]' for nil:NilClass}} On the puppetmaster ...
Jira (PDB-106) Report processor in puppetdb-terminus fails if report has no metrics
Title: Message Title Jason Antman updated an issue PuppetDB / PDB-106 Report processor in puppetdb-terminus fails if report has no metrics Change By: Jason Antman Attachment: mco_traceback.txt Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
Jira (PDB-106) Report processor in puppetdb-terminus fails if report has no metrics
Title: Message Title Jason Antman updated an issue PuppetDB / PDB-106 Report processor in puppetdb-terminus fails if report has no metrics Change By: Jason Antman Summary: Report processor in puppetdb-terminus fails during catalogue compilation failures if report has no metrics Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.