The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #10676

last run summary is an inconsistent data structure

Added by Nigel Kersten almost 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:11/09/2011
Priority:HighDue date:
Assignee:-% Done:

0%

Category:reports
Target version:2.7.10
Affected Puppet version: Branch:https://github.com/masterzen/puppet/tree/tickets/2.7.x/10676
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

  • If a run has a failed resource such that all the subsequent events don’t fire, we don’t write out ‘events 0’, we simply don’t put in the events key.

RI’s real world use of this file led him to need to create a hash with the following data and merge it in. We should be consistent so this isn’t needed.

  • failed
  • changed
  • total
  • restarted
  • out of sync

We should just do something similar but with absolutely every top level item. Start with the base data structure, and merge into it, rather than building it up as it sounds like we’re doing.

History

#1 Updated by Nigel Kersten almost 3 years ago

  • Description updated (diff)

#2 Updated by Brice Figureau almost 3 years ago

  • Branch set to https://github.com/masterzen/puppet/tree/tickets/2.7.x/10676

One of the reason we do it this way is that a report has no schema enforced. The last run summary is extracted from the current registered metrics, and those are registered depending on what happened during the run.

I’ve sent a pull request containing a step in the correct direction, at least we’ll now have all resources status defined. Check: https://github.com/puppetlabs/puppet/pull/212

#3 Updated by James Turnbull almost 3 years ago

  • Category set to reports
  • Status changed from Accepted to In Topic Branch Pending Review

#4 Updated by Jacob Helwig over 2 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version changed from 3.x to 2.7.10

Merged brices patch into 2.7.x in commit:04b027b8d4a4e13b4b9f2ee7cd4c01715ffd68e8

(#10676) Include all resource statuses in reports regardless of count

Before, we would only include resource status states, and
failure/success counts if there were resources that were in these
various states.  We now initialize the hashes used to gather the
counts of these metrics so that they will include all known states,
even if the count of resources that were in that state is zero.

Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Signed-off-by: Jacob Helwig <jacob@puppetlabs.com>

#5 Updated by Michael Stahnke over 2 years ago

  • Status changed from Merged - Pending Release to Closed

released in 2.7.10rc1

Also available in: Atom PDF