influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

HH Throws error even if disabled

Open corylanou opened this issue 11 years ago • 7 comments

If you disable (or remove) the HH config, the service won't start and gives this error:

run: HintedHandoff.Dir must be specified. To generate a valid configuration file run `influxd config > influxdb.generated.conf`.

It should not be requiring a directory for a service that is disabled.

corylanou avatar Sep 30 '15 21:09 corylanou

https://github.com/influxdb/influxdb/blob/master/cmd/influxd/run/config.go#L107

jwilder avatar Sep 30 '15 21:09 jwilder

We probably need to change it to:

 else if c.HintedHandoff.Dir == "" && c.HintedHandoff.Enabled

corylanou avatar Sep 30 '15 21:09 corylanou

I took a quick look at this code. I agree there doesn't seem to be a better way.

otoolep avatar Oct 03 '15 06:10 otoolep

Hmm, but the issue is HH is on by default, so it is not as easy as that.

otoolep avatar Oct 03 '15 06:10 otoolep

Anyone familiar with toml processing -- or can just check out the code -- may be able to solve this issue. It's easy to reproduce -- simply pass a config file to influxd that does not contain any HH section.

otoolep avatar Nov 04 '15 19:11 otoolep

Hi @otoolep , I have created a pull request for this issue, the way to fix is like @corylanou 's comment. And one more thing is, since the Dir value is mandatory, so I disable HH by default, hope it make sense.

ch33hau avatar Nov 10 '15 14:11 ch33hau

All done!

otoolep avatar Nov 13 '15 07:11 otoolep