-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
|
The changes themselves look good! |
|
@suckatrash I assume we should wait for this to be merged before merging the release PR and publishing 2.2.0 and releasing the coupled puppet_metrics_collector 6.0.0? |
|
@tkishel I don't want to hold anything up with this. I may not finish it today so I'd say go ahead with a release |
|
Well, we made the same endpoint change in puppet_metrics_collector 6.0.0. |
|
I think we might need to reconsider using |
Well, it cleared all the Travis errors :) I use the Puppet version to detect PE version here: https://github.com/tkishel/pe_tune/blob/master/lib/puppet_x/puppetlabs/tune.rb#L1050 So how about this: |
|
Yay! |
|
Note that it's possible that the agent's Puppet version differs from the Master (or that of the PuppetDB host). We could check |
939aed0
to
8b65a2c
Compare
|
For PE 2018.1.13 ... |
|
Travis is failing because there is no We can easily resolve that, I don't think we should emit a |
|
Right, I forgot about that use-case. Then we need to return ['localhost'] in that case since I think since the service only listens there in the versions we're accommodating. |
|
True. Maybe ... |
7726591
to
274f580
Compare
2257a32
to
dad604a
Compare
| if $facts['puppet_server'] == $trusted['certname'] { | ||
| $hosts = ['localhost'] | ||
| } else { | ||
| $hosts = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this, I know its an "unnecessary" assignment for a return value, but it makes it easier to read!
7e2d040
to
fe83ee6
Compare
fe83ee6
to
f61c345
Compare
f61c345
to
2480b65
Compare
|
I'll squash these commits once all looks good here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a lot of good work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine to me. One thing that stood out is it seems this chunk is used all over the place:
if ((versioncmp($facts['puppetversion'], '6.14.0') >= 0) or
(versioncmp($facts['puppetversion'], '5.5.19') >= 0) and (versioncmp($facts['puppetversion'], '6.0.0') < 1))Maybe that should be pulled out into a function to simplify things.
b65e856
to
5ae2489
Compare
|
Nice work everyone |
This PR addresses the changes to metrics endpoints required by CVE-2020-7943:
['localhost']inlocalhost_or_hosts_with_pe_profile()ifpuppet_versionis greater than 6.14.0 9 or greater than 5.5.19 but below v6) when the function runs on the master. If not run on the master, an empty array is returned.puppetdb_hostinpuppet_metrics_dashboard::profile::puppetdbto localhost. This would be overridden when called frompuppet_metrics_dashboard::telegraf::configwhen a list of puppetdb hosts is returned fromlocalhost_or_hosts_with_pe_profile()hosttag instead ofserver(so we don't see localhost on all the dashes).