-
Notifications
You must be signed in to change notification settings - Fork 6k
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
doc: replace spaces with underscores in config option names #45887
Conversation
It would seem GitHub had automatically added a newline at the end since the last line was missing a newline. |
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.
Nice catch. I can't imagine a reason why the lack of a terminal newline would be intentional.
Furthermore, I just noticed there are more strange looking config in this file: osd_pool_default_min size = {n} # Allow writing n copy in a degraded state.
osd_pool_default_pg num = {n}
osd_pool_default_pgp num = {n} Are all these 3 having the final underscore Edit: indeed all 3 config parameters would seem to be having an underscore instead of a space. Will add a commit for that I guess? |
Another nice catch. Last year I went around and changed all the spaces in option names that I could find to be underscores, for uniformity and easy of copy/paste. Clearly I missed these. Please do add / amend for these changes. |
Ah, that makes sense. I am new to ceph, still middle of first production deployment, so was unaware that the syntax takes both spaces/underscores and the history. Pushed another commit for those 3 lines. |
Welcome, and thanks for contributing. |
Please excuse me, since this question is out of scope of this PR - but wouldn't |
By all means please do question anything and everything with fresh eyes. I suspect that this file has been with us for a long time. I poked around to see if it were depended upon by other resources that might have cause to deploy Filestore OSDs, but best I can tell it is truly a standalone example of what Many operators do still have pre-existing Filestore OSDs, and a few have specific reasons to continue deploying them, so my sense is that it's not yet time to erase all traces of it from the docs. That said, I agree with you that |
As I read the documentation I keep stumbling to more spaces in configuration variable names such as:
It seems to me that the above sections should be fixed to use underscores if that is the current policy. Would you squash on the possible merge or should I squash after adding the commits for other documentation files? |
Nice catch. I think we have sufficient precedent to prefer underscores throughout the docs. Squash and merge appears to not be enabled for this repository, so it'd be best for you to amend/squash/force-push. |
I will keep on adding commits as I see such config in the docs and squash in the end, possibly near the end of the week. Thanks. |
@bluikko I renamed the PR, squashed and was about to merge when I noticed that you were looking for more occurrences. Underscores are indeed preferred, let me know when it's ready! |
Indeed, was going to finish this by the end of the week. |
There are often double spaces, more often after punctuation than between words. Is that on purpose? There is quite a bit of them! Edit: I am not very familiar with RST but at a quick look I could not find any syntactic meaning for it. Perhaps something for another PR? Also quite a few inconsistencies with
vs
where the former should probably be changed to latter, e.g. https://docs.ceph.com/en/latest/rados/operations/pools/ Some formatting oopsie at https://docs.ceph.com/en/latest/rados/api/python/#rados.Ioctx.get_stats for |
That does it for "Ceph Storage Cluster" chapter. Instead of taking list of config var names, replacing I will think whether automating the rest would make more sense... target is still end of the week. |
I support the manual idea, or at least a review of results before committing. I would expect some misleading hits from a fully automated action. Alternately we can merge what we have and you could follow up with another PR. The longer we delay the greater the chance of having to rebase. |
I think your suggestion is probably the best way, conflicts should be avoided of course. With that in mind, this PR is ready. I was planning that if doing some kind of scripting then it would be only for detection of spaces instead of underscores. All fixing I would have planned to do manually. |
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
One underscore in |
Many of us were taught to write that way during the typewriter era and even beyond. It's been an ingrained practice for quite some time. In recent years there has been movement toward single spaces after punctuation. A lot of software these days ends up rendering single and double spaces after punctuation identically anyway, so in our context while I think we currently prefer a single space, I personally don't consider a double space an error.
As far as I'm concerned, collapsing double spaces doesn't itself warrant a PR, but if you're already in a file making other changes it's okay to make those too, but I wouldn't spent any time on it.
My sense is that the latter may only have been valid and functional within the last year or two, so there are many pre-existing instances. My personal practice lately has been to update when I'm making other changes.
That one's beyond my ken, unfortunately. |
@anthonyeleven Very clear, thank you! |
Several documentation files use the historical format of
spaces in config parameter names instead of underscores.
Change them to use underscores instead to follow the
current practice.
There was also a malformed config with both space and
an underscore and a missing newline at the last line of
demo config.
Monitoring OSD section had incorrect text wrapping in
one occurrence and several occurrence of extra spaces:
double or even triple spaces between words and extra
spaces at end of lines on a diagram.
Python API section had a config example without spaces
around the equal sign.
Signed-off-by: Ville Ojamo 14869000+bluikko@users.noreply.github.com
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows