Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collectd::config::type should export wrapped concat::fragment #12

Open
faxm0dem opened this issue Sep 4, 2014 · 2 comments
Open

collectd::config::type should export wrapped concat::fragment #12

faxm0dem opened this issue Sep 4, 2014 · 2 comments

Comments

@faxm0dem
Copy link
Contributor

faxm0dem commented Sep 4, 2014

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

@faxm0dem
Copy link
Contributor Author

faxm0dem commented Oct 6, 2015

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

@faxm0dem
Copy link
Contributor Author

faxm0dem commented Nov 4, 2015

any comments on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant