hectcastro / chef-graphite

A Chef cookbook to install Graphite.
Apache License 2.0
29 stars 28 forks source link

Priority is not used in storage_schemas any more #18

Open icebourg opened 11 years ago

icebourg commented 11 years ago

Per this bug, priority is no longer used in storage_schemas. If I'm not mistaken, and they haven't added priority back into a later release, it means the attributes this cookbook uses to configure storage schemas does not work as advertised.

In my testing, the default cookbook attributes always get written to the file first. So the "catchall" example will always be used on everything, no matter what attributes I may set in a role or elsewhere.

There are a few options. The most straight forward would be to change to a "catch-nothing" as the cookbook default so the file still gets written and carbon-cache will still start, but so that people can still write their own rules.

The other way I was thinking was to have the recipe check to see if node[:graphite][:storage_schemas] is set at all, use that as is if it is. And in the attributes, we would just comment out what we have, with a note that if you want to customize your retentions in a role, here's an example of how to do it. Then we can still have a default for people who don't configure it, but don't mess up those who do.

I think I prefer the later and if there's support, I can develop a PR to do that.

AJ