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
Which means that sections are reordered by section name alphabetically rather than by the order they are defined in the file. This is dangerous since carbon is order-sensitive when it parses the rules in INI files. For example, in single_node.rb example in the cookbook, you have the following:
In this case, the insertion order is the same as the alphabetic order ("carbon" then "default_1min_for_1day"). If you switch the names around the pattern .* will catch everything and the "carbon" rule will never be matched, resulting in completely different behavior and expensively unexpected results.
The text was updated successfully, but these errors were encountered:
The solution for ruby 1.9+ is simple: remove sort_tuples function. For earlier versions, you'll have to use some ordered hash implementation throughout or to keep the order in an independent list.
Right now in
cookbooks/graphite/libraries/chef_graphite.rb
the INI file sections are generated as such:Which means that sections are reordered by section name alphabetically rather than by the order they are defined in the file. This is dangerous since carbon is order-sensitive when it parses the rules in INI files. For example, in
single_node.rb
example in the cookbook, you have the following:In this case, the insertion order is the same as the alphabetic order ("carbon" then "default_1min_for_1day"). If you switch the names around the pattern
.*
will catch everything and the "carbon" rule will never be matched, resulting in completely different behavior and expensively unexpected results.The text was updated successfully, but these errors were encountered: