-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This removes all join URLs from the config. To join a node to a cluster, the URL of another member of the cluster should be passed on the command line w/ the -join flag. The join URLs can now be any node regardless of whether the node is a broker only or data only node. At join time, the receiving node will redirect the request to a valid broker or data node if it cannot handle the request itself.
- Loading branch information
Showing
7 changed files
with
83 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8b5307f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there a significant gain in removing this from the config file? My only concern (admittedly very nitpick-y) is that automated deployment of InfluxDB nodes will now require the users config management code to lay down a custom init script or upstart config as opposed to just laying down a custom Influx config file and expecting the stock packaged startup mechanisms to work. Not onerous, but out of the norm it seems.
Certainly not a huge problem, but seems like a papercut that could avoided - unless I'm missing some benefit to doing it this way. :-)
8b5307f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cboggs we were doing it for cleanliness since it's something that is only paid attention to on the first startup. And it's easier in our code to know that you're configuring for the first time if that flag is passed in.
If it makes config management much easier to have it in the config file, perhaps we can have a section in there titled
run_once
or something. What you think @jwilder or @corylanou?8b5307f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cboggs makes an excellent point. Forcing our users to have a custom init script is a non-starter because every time InfluxDB is upgraded, the new package unconditionally overwrites any existing script in
/etc/opt/init.d
. This is important because sometimes bug fixes require changes to the init scripts. If user-specific changes are in the init script, they will be lost on upgrade.We have two choices are far as I can see -- back to an "initialization" section in the config file, which we had before but previously removed (this may have been a mistake), or allow the
join-urls
to be specified in/etc/influxdb/defaults
, which is sourced by the init.d script on startup. I prefer option 1.8b5307f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, if end-users launch
influxd
using their own tools which specify all options, then perhaps they shouldn't be using the init.d script i.e.service influxdb start
from those tools. In that case our init.d script is only useful for single-node systems, which I don't think is desirable.8b5307f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this isn't ideal at the moment. I think we should:
[Initialization].join-urls
/etc/influxdb/defaults
. Should never need to maintain a custom init script.-join
flag takes precedence over config values and existing cluster state takes precedence over any-join
flag orjoin-urls
config option.8b5307f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to everything @jwilder said
8b5307f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of options 1 and 2, we only need to implement 1, right? What use is 2 if we have 1? I might be missing something, of course.
I prefer 1, FWIW.
8b5307f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, both need to be implemented. The preferred way to set joins URLs when using config management would be through the config file. 2 is needed because the init script is broken if you can't pass command-line options w/o editing it.
8b5307f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I like @jwilder's summary, I think those are all pretty necessary.
Thanks guys!