[Pkg-puppet-devel] Bug#923976: Bug#923976: Bug#923976: puppet: Reports submitte
Apollon Oikonomopoulos
apoikos at debian.org
Sat Mar 9 21:24:27 GMT 2019
Control: tags -1 - unreproducible
Hi,
On 12:26 Fri 08 Mar , Kienan Stewart wrote:
> Hi,
>
> I have made a patch which seems to resolve the issue. I'm not at all confident
> it's in the right place. The patch applies to the PuppetDB source which is used
> to make the puppet-terminus-puppetdb package.
>
> diff --git a/puppet/lib/puppet/reports/puppetdb.rb b/puppet/lib/puppet/reports/puppetdb.rb
> index d3f0c07..b78f02c 100644
> --- a/puppet/lib/puppet/reports/puppetdb.rb
> +++ b/puppet/lib/puppet/reports/puppetdb.rb
> @@ -129,7 +129,7 @@ Puppet::Reports.register_report(:puppetdb) do
> [:puppetdb, :metrics_list, :build]) do
> metrics_list = []
> metrics.each do |name, data|
> - metric_hashes = data.values.map {|x| {"category" => data.name, "name" => x.first, "value" => x.last}}
> + metric_hashes = data.values.map {|x| {"category" => data.name, "name" => x.first, "value" => x.last.to_f}}
> metrics_list.concat(metric_hashes)
> end
> metrics_list
>
> I'm not aware if there will be consequences to forcing all the metrics values to
> floats.
Thanks for the patch, it should do the trick. However, before applying
it I want to be 100% sure that we know what's happening and why.
So, I managed to reproduce this by simply installing ruby-multi-json,
which allows Puppet to use different json backends. Can you verify that
ruby-multi-json is installed, presumably on the master?
Thanks,
Apollon
More information about the Pkg-puppet-devel
mailing list