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
Order loading sourced conf files #1154
Comments
A lot clearer and a commitment much appreciated by certain sysadmins. But... If you claim the .conf files "are loaded in case insensitive alphabetic order", then the first example is incorrect, since the load order between 'A.conf' and 'a.conf' would be undefined by mosquitto on a case sensitive file-system whereas the example would not be possible at all on a case insensitive file system. If the order is case insensitive, then may I suggest a mentioning that the load order of 'A.conf' and 'a.conf' remains undefined on case sensitive file systems ? Alternatively... If I may get nifty... Clear and concise on a case sensitive system and does no harm on a case insensitive system, since 'A.conf' and 'a.conf' will never be found in the same directory on a case insensitive file-system. Sorry to be such a pain somewhere. I just think this effort should be addressed once, with the intention to not bring it back up later unless changes are made to this logic. |
Yep, agreed. It is now explicitly case sensitive, with the upper case of each letter ordered before the lower case of the same letter, i.e. AaBbCc. In this sort of context, "case sensitive sort" to me usually means the ABCabc type ordering that strcmp carries out, which isn't the most obvious if you aren't a programmer. |
We're loading .conf files with the 'include_dir /etc/mosquitto/conf.d' statement.
Tests with versions 1.5.3 and 1.5.6 tend to indicated that the sourced .conf files are loaded in alphabetic order. First is the contents of '00-something.conf' loaded, followed by '10-something.conf', '20-something.conf', etc. (It's our understanding. Is this understanding correct?)
This behavior is to my knowledge not documented in the man pages and logically depending upon it is therefore prone to future breakage.
If this 'load-order' of sourced configuration files is deliberate, could we get it mentioned in the documentation? If it's not, should/could it become deliberate and documented?
Could documentation also indicate what happens if using more than one 'include_dir' statement in the main configuration file? One would guess: First 'include_dir" would be loaded, files in alphabetic order, followed by second 'include_dir', with it's files in alphabetic order, etc. But that's just a guess.
If order is random, and deemed to remain random, could that be documented in the man pages?
Regards
The text was updated successfully, but these errors were encountered: