Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cmd/influxd): add nats-port config option to influxd server #20561

Merged
merged 2 commits into from
Jan 20, 2021

Conversation

danxmoran
Copy link
Contributor

Closes #16442

Relevant git archeology:

  • nats.NewDefaultServerOptions() returns a struct with Port set to 4222
  • Unit tests that used the influxd launcher sometimes failed with port conflicts because of NATS
  • 047afcf added a hacky loop that would try to find an unused port closest to 4222
  • fab99c9 replaced the loop with a built-in marker for random port selection

Random isn't very good for running in Docker, so we add a config parameter to support setting a specific value. I left the default as random just in case.

Copy link
Contributor

@davidby-influx davidby-influx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our discussion, looks good.

@danxmoran danxmoran merged commit d8a4b4d into master Jan 20, 2021
@danxmoran danxmoran deleted the dm-nats-port-conf-16442 branch January 20, 2021 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow NATS port to be configurable
2 participants