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
RFE: Friendlier configuration of ns-slapd listen addresses #2366
Comments
Comment from firstyear (@Firstyear) at 2017-06-30 01:51:48 I think this is a really good idea. I think the only risk I see is that we have to maintain the configurations of existing configs. So here is how I would this approached. First is that we make this a multivalue attribute like you say, and we can show that it works correctly. The next is that if any of the value lines have "host, host", we do an internal replace to make it two lines. This way we update the configuration on upgrade. And finally, we need test cases that shows this works correctly. How does that sound? |
Comment from firstyear (@Firstyear) at 2017-06-30 01:51:49 Metadata Update from @Firstyear:
|
Comment from tbordaz (@tbordaz) at 2017-06-30 10:36:12 Indeed it is a good idea. Now I do not like that much the idea of comma separated interfaces. |
Comment from lkrispen (@elkris) at 2017-06-30 11:07:08
I agree. And I don't see the need of the step with a list. At the point we support multiple values, we can do it with multivalued attributes. And if a deployment wants to make use of it, the config has to be changed anyway |
Comment from firstyear (@Firstyear) at 2017-07-01 04:05:09 If we wanted to be particularly strict on this, we could make a syntax error to have a , in the list and prevent start up along with a message explaining the reason? |
Comment from merlinthp at 2017-07-01 13:27:23 OK then, as a starter for discusson, how about this? |
Comment from firstyear (@Firstyear) at 2017-07-03 05:20:59 Great start. Some comments:
Arrays in C are always indexed by size_t, and you should try and use the counters in the forloop init if possible to prevent shadow / value reuse.
I think it's a really good start, thank you! I think that if I was to do one thing it would be to leave the parsing code for the comma separated values in place. Then when you set these in the config, and dse.ldif is written, it'll be turned into a multivalue list anyway. So that would be really good to test as well. This way we have a seamless upgrade path for users. Thanks again for your work! |
Comment from firstyear (@Firstyear) at 2017-07-03 05:24:53 As some light side reading, https://matt.sh/howto-c and http://www.port389.org/docs/389ds/development/coding-style.html Thanks so much! |
Comment from merlinthp at 2017-07-03 10:16:36 Looking at the current code, I don't see anything that handles a comma separated list of names. A quick test with master shows that it fails. Thanks for the pointers for the C coding style stuff. I automatically try to match the style of the code I'm making changes to, which isn't what we want in this case :) |
Comment from firstyear (@Firstyear) at 2017-07-04 02:52:02 It's hard to follow our style because there are "so many styles" over time. I am trying to ask for a higher "baseline" from new code, and touching up old locations, so that future work becomes easier. Thanks for accepting my feedback on this, Okay, if the current code doesn't even use a comma sep list, then I think we have very few hurdles to this change. It seems pretty painless. Thanks again, |
Comment from mreynolds (@mreynolds389) at 2017-10-18 21:35:07 Metadata Update from @mreynolds389:
|
Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/49307
ns-slapd will listen on all interfaces by default, or whatever is specified in nsslapd-listenhost and nsslapd-securelistenhost. These attributes can be used to configure ns-slapd to listen on a subset of interfaces if the value is a name that getaddrinfo resolves to multiple addresses (e.g. by having multiple entries in /etc/hosts for the same name). I'd say that that's a bit of a non-obvious and unusual way of doing things these days.
It would be nice if there was a different way to configure this, maybe by making the nsslapd-*listenhost attributes multi-value, or allowing them to take a comma separated list of values.
The text was updated successfully, but these errors were encountered: