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

no_advertise config setting is not documented in README #950

Closed
JensRantil opened this issue Apr 16, 2019 · 8 comments
Closed

no_advertise config setting is not documented in README #950

JensRantil opened this issue Apr 16, 2019 · 8 comments

Comments

@JensRantil
Copy link

Let me know if I should expect it to be documented somewhere else. Generally it seems like NATS Streaming config options are better documented in README than NATS.

@JensRantil
Copy link
Author

Should likely be added here.

@kozlovic
Copy link
Member

Thank you for the feedback! For this specific param, I think we do explain what it does in that section: https://github.com/nats-io/gnatsd#configuration-options, specifically:

If those addresses are not reachable from the outside world where the clients are running,
the administrator can use the --no_advertise option to disable servers gossiping those URLs.
Another option is to provide a --client_advertise URL to use instead. If this option is specified
(and advertise has not been disabled), then the server will advertise this URL to other servers
instead of its listen address (or resolved IPs when listen is 0.0.0.0 or ::).

@JensRantil
Copy link
Author

Yes, but it is not mentioned anywhere that it exists as a configuration file option. Apologise for the unclarity on my part.

@kozlovic
Copy link
Member

No apologies needed.. I think we have discussed this also in NATS Streaming, we may come up with a config file in the doc that contains ALL parameters but commented out so that if users copy/paste this file, at least they are not running with crazy values. But each param could then be documented with its syntax, possible and default values, etc..

@JensRantil
Copy link
Author

Another reason why I'm filing this issue is because NATS doesn't complain when I'm putting this in the root scope of the file. I put it there because

$ gnatsd --help
...
        --no_advertise <bool>        Advertise known cluster IPs to clients
...

hinted that the setting had to do with "clients" which made me believe this setting should be in the same configuration scope as client_advertise, which was wrong.

Above said, the setting seem to kick in in the root scope. Is it the same as setting in cluster section?

@kozlovic
Copy link
Member

This is from the command line output. But if you have it in your configuration file, it should be under the cluster {} section. Note that in NATS 2.0 (in master), we also have this setting available in configuration file for leaf nodes and gateways.

@kozlovic
Copy link
Member

Again, not trying to justify that doc is good enough, it is not. But from the command line, you see that the no_advertise is under the cluster options:

Cluster Options:
        --routes <rurl-1, rurl-2>    Routes to solicit and connect
        --cluster <cluster-url>      Cluster URL for solicited routes
        --no_advertise <bool>        Advertise known cluster IPs to clients
        --cluster_advertise <string> Cluster URL to advertise to other servers
        --connect_retries <number>   For implicit routes, number of connect retries

which means that the equivalent in configuration file will be in cluster {}. But again, having a config with all properties spilled out would make it easier for users.

JensRantil added a commit to JensRantil/nats-server that referenced this issue Apr 16, 2019
This commit came out of [1] and [2]. Clarifies current behaviour much
better.

[1] nats-io#950 (comment)
[2] nats-io#952
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

No branches or pull requests

3 participants