bdangit/chef-influxdb

Support [coordinator] config option (InfluxDB v1.0.0)

kentarosasaki opened this issue · 7 comments

From v1.0.0, Config option [cluster] has been replaced with [coordinator]
https://github.com/influxdata/influxdb/blob/master/CHANGELOG.md#v100-2016-09-08

This cookbook is still using [cluster] config option. When adding [coordinator] option in node attributes, you get the following error and cannot start InfluxDB process because influxdb.conf had both [cluster] and [coordinator]. It might be better to remove cluster option from attributes/default.rb

$ sudo /bin/influxd

 8888888           .d888 888                   8888888b.  888888b.
   888            d88P"  888                   888  "Y88b 888  "88b
   888            888    888                   888    888 888  .88P
   888   88888b.  888888 888 888  888 888  888 888    888 8888888K.
   888   888 "88b 888    888 888  888  Y8bd8P' 888    888 888  "Y88b
   888   888  888 888    888 888  888   X88K   888    888 888    888
   888   888  888 888    888 Y88b 888 .d8""8b. 888  .d88P 888   d88P
 8888888 888  888 888    888  "Y88888 888  888 8888888P"  8888888P"

[run] 2016/09/09 16:00:50 InfluxDB starting, version 1.0.0, branch master, commit 37992377a55fbc138b2c01edd4deffed64b53989
[run] 2016/09/09 16:00:50 Go version go1.6.2, GOMAXPROCS set to 2
[run] 2016/09/09 16:00:50 Using configuration at: /etc/influxdb/influxdb.conf
[run] 2016/09/09 16:00:50 deprecated config option [cluster] replaced with [coordinator]; [cluster] will not be supported in a future release
run: parse config: Near line 27 (last key parsed ''): Key 'coordinator' has already been defined.

Config near line 27:

20 [cluster]
21 log-queries-after = "20s"
22 max-concurrent-queries = 100
23 max-select-buckets = 5000
24 max-select-point = 0
25 max-select-series = 0
26 query-timeout = "20s"
27 [coordinator]
28 log-queries-after = "20s"
29 max-concurrent-queries = 100
30 max-select-buckets = 5000
31 max-select-point = 0
32 max-select-series = 0
33 query-timeout = "20s"

Also need to fix opentsdb and collectd blocks in config. It must be [[opentsdb]] and [[collectd]].

it sounds like this will be a major breaking release if we apply these changes.

@bdangit sounds like a good time for a major version bump of the cookbook!

I ran into trouble with CentOS 7.2, it only has 1.0.0 in the repo and the cookbook fails to install influxdb. I added a wrapper cookbook to install 1.0.0 instead, but now I'm running into a TOML error when influxdb tries to start:

config: parse config: toml: cannot load TOML value of type map[string]interface {} into a Go slice

Not sure if that is a separate issue from what is described here or not

@fletchowns yours sounds like a different problem. Can you create a different issue and please paste in your config you are trying to pass in?

As for the core of this issue, I'll get back to you on this this week.

working on #124 to fix OP issue

-- @fletchowns I reviewed 1.0.0 changes and tested some converges. No need to create a new ticket. Upcoming PR should fix this error since its related to the config file changing.

@bdangit awesome, thank you!!

influxdb 5.0.0 is merged and uploaded to supermarket. have fun cooking!