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
cephadm: eliminate duplication of sections #50318
Conversation
…extra-ceph-conf Signed-off-by: Rongqi Sun <sunrongqi@huawei.com>
Signed-off-by: Rongqi Sun <sunrongqi@huawei.com>
Signed-off-by: Rongqi Sun <sunrongqi@huawei.com>
Reruns of failed/dead jobs: https://pulpito.ceph.com/adking-2023-03-08_13:40:40-orch:cephadm-wip-adk-testing-2023-03-07-1710-distro-default-smithi/ After reruns, 1 failed and 2 dead jobs:
Overall, nothing in that run that would block merging |
@Svelar do you want this backported to quincy or pacific? |
Yes please, should I create an issue first? |
typically, we would have had a tracker beforehand and then set it to pending backport which would cause some automation to automatically open backport trackers. We can then feed those backport tracker numbers into a tool that automatically attempts to open a backport. (e.g. https://tracker.ceph.com/issues/58465 put to pending_backport caused https://tracker.ceph.com/issues/58776 to be created). Since we've already merged this, you could either create a tracker after the fact, link this PR to it ("Pull request ID" field in first tracker I linked) and then set it to pending backport, OR I could just manually open the backports since we've already merged this and it wouldn't be too much work for me. Whatever you prefer. |
Never done this before. Maybe I could try it very first time. Thanks for so detailed guide. |
I have created a tracker( https://tracker.ceph.com/issues/58948), but I can't set it to 'pending backport' status. Once its status is changed, I could use 'ceph-backpoet.sh' to backport it. |
continue | ||
section = '' | ||
for line in conf.split('\n'): | ||
if line.strip().startswith('#') or not line.strip(): |
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.
Do we really have to build our own config parser for this? I guess we have to, right? But is this the right place to start building a config parser in Python for ceph?
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.
Actually for now, minimal conf can't be created by user, so config parser is simply. The main purpose is to mix two confs. Any suggest?
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.
probably once we start refactoring cephadm (in reef by using the new packaged version) we can add/reuse support to parse conf and use it to perform this merging moving this code outside of cephadm.
cephadm: eliminate duplication of sections when applying set-extra-ceph-conf
In the past, multiple same sections in one conf file are allowed. But now it will cause error. Even now minimal conf only contains [global] section, custom minimal conf should be considered. Thanks to Adam King's advice and code sample, I combine minimal conf with extra conf according to same section.
Fixes: https://tracker.ceph.com/issues/58948
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
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