You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in collectd/config/type.pp that makes the puppet module misbehave when the same type of exported resources is being used in other modules.
Here's the thing: we're declaring @@concat::fragment exported resource without the mandatory target parameter. This is perfectly fine, as long as we don't realize the resource without overriding the target, which is what we do in config.pp. BUT, if any other module which is included in the catalog run is doing something similar, e.g. declaring is own @@concat::fragment with its own tags, and also omits the mandatory target parameter, we'll get a nice error message:
Error 400 on SERVER: Must pass target to Concat::Fragment[other-module-which-has-nothing-to-do-with-collectd]
This is happening, because even though we're collecting only resources tagged collectd_typesdb, the other resources still get passed to the compiler, and thus get validated, and fail because they have no target.
I'll submit a PR to solve this ASAP, I already have the solution. Just putting this here as a TODO
The text was updated successfully, but these errors were encountered:
Rethinking this, I believe it's a bad idea altogether to collect exported resources, or at least it should be optional. It makes perfect sense to do it on the collectd hosts that listen for events using the network plugin, but not for the others: everytime I add a type, I have 2000 collectd restarting in the DC O_o
Here's the proposed change, please comment:
continue exporting type resource
only collect resource on hosts having a network plugin configured for Listening
collect (virtual) resource on host itself which needs it to dispatch values
There is a bug in
collectd/config/type.pp
that makes the puppet module misbehave when the same type of exported resources is being used in other modules.Here's the thing: we're declaring
@@concat::fragment
exported resource without the mandatorytarget
parameter. This is perfectly fine, as long as we don't realize the resource without overriding thetarget
, which is what we do inconfig.pp
. BUT, if any other module which is included in the catalog run is doing something similar, e.g. declaring is own@@concat::fragment
with its own tags, and also omits the mandatorytarget
parameter, we'll get a nice error message:This is happening, because even though we're collecting only resources tagged
collectd_typesdb
, the other resources still get passed to the compiler, and thus get validated, and fail because they have notarget
.I'll submit a PR to solve this ASAP, I already have the solution. Just putting this here as a TODO
The text was updated successfully, but these errors were encountered: