balancer: refactor calc_pg_upmaps to allow for more simplicity#44002
balancer: refactor calc_pg_upmaps to allow for more simplicity#44002ljflores merged 1 commit intoceph:masterfrom
Conversation
|
Hey @JoshSalomon I see the problem with the Here is the error message: If you fix the commits that are missing a prefix, you should be good. |
|
@JoshSalomon also, not sure if this will trigger the That is generally the convention for contributions. |
556031a to
30b6fdb
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
I know and I changed it - what is left is commit before the change |
|
jenkins test signed |
|
@JoshSalomon the Also, are the new commits from other people meant to be in this PR? Or were they unintentionally added after the force push? If it's the latter, let me know if you need help removing the irrelevant commits. |
cbf108d to
e5f09f0
Compare
|
@JoshSalomon I see now that you actually can remove/add labels on drafts. If you want to do that, hit the gear icon next to "Labels" in the upper right corner, and you should be able to edit as you need. |
|
Hey @JoshSalomon, Your PR looks okay to me. If you ever see this in the make check details: Know that it is a known failure, and that usually a retest will solve the issue. You are not making any modifications to rbd, so it's clear that this failure is unrelated. Same goes for docs. For whatever reason, there are failures going on right now in docs, but your modifications to the docs passed before, so they are likely unrelated. If you ever are curious about why the docs are failing, you can click on "Details" next to "Required" and inspect the error message. But I believe in your case, it's unrelated. Edit: Here is a list of all available jenkins commands, which you can trigger in the same way as above-- by leaving a comment. This list is available on all PRs when you click on the dropdown menu that says "Show available jenkins commands": |
|
jenkins retest this please |
|
jenkins test api |
|
jenkins test docs |
|
jenkins render docs |
|
@JoshSalomon are you ready to take this out of draft form? If so, you can select "Ready for review" next to "This pull request is still a work in progress." Also, let me know when you are ready for reviews. You can add me as a reviewer, and also it might be a good idea to add @neha-ojha and @jdurgin. |
|
jenkins render docs |
|
This is the error message from the Doesn't seem to have anything to do with your doc commits, however, we should try to get the test to pass to confirm that. |
|
Newest teuthology run: It's still not done yet, but I'll add a summary of failures when the jobs complete. |
ljflores
left a comment
There was a problem hiding this comment.
There is some spacing that looks a little off here, but it otherwise looks good to me! I've gone through everything and it seems like you've effectively translated the same logic over into the refactoring.
The main thing I want to focus on now is ensuring that this branch is not causing regressions. In the most recent Teuthology run of this branch (see prevous comment), there were a lot of failures. Looking through them, they don't seem obviously related, but I'd like to try and get more of these tests to pass.
I re-ran the failed/dead jobs here. We'll see how this run goes.
http://pulpito.front.sepia.ceph.com/lflores-2022-01-04_06:21:44-rados-wip-primary-balancer-distro-default-smithi/
Beyond that, we might want to consider rebasing the branch again to test the changes on the most recent version of master to avoid a mass of unrelated failures.
|
@JoshSalomon also we will want to squash commits that relate to the same concept. We can go over this in our meeting. :) |
|
@JoshSalomon how is the commit squashing going? Let me know if you need help |
|
Hello, I wonder in what way do you design the primary balance feature without data movement? It seems that there are no relative code in commits. I think it's almost impossible to achieve this through upmap feature (especially for ec pool). So I'm really curious about your idea. |
4a4becc to
c9dcf1c
Compare
I will let @ljflores explain how we change primaries without data movement - in any case this will be in a new PR and not in this one. This PR is just a first in a list of PRs that will improve current upmap balancer and will add primary balancing. (I thought we can make a single PR but I was wrong) |
Can we please update the PR title to reflect the primary aim of this PR? |
Thanks for your reply. I have two questions. As I'm new to ceph these questions may be emm... a little bit ridiculous... |
Done - changed the title and the description. |
For fast mode search fast_read in https://docs.ceph.com/en/latest/rados/operations/pools/ |
Okay, I get it! Thanks a lot! |
You are right |
|
@JoshSalomon @ljflores Let's target the refactor commit for Quincy and hold off on merging |
This is the first commit in a series of commits that aims at adding a primary balancer to Ceph and improving the current upmap balancer functionality. This first commit focuses on simplifying (refactoring) the code of `calc_pg_upmaps` so it is easier to change in the future. This PR keeps the existing functionality as-is and does not change anything but the code structure.
As part of the work is major refactoring of OSDMap::calc_pg_upmaps, the first thing is adding an --upmap-seed param to osdmaptool so test results can be compared without the random factor.
Other changes made:
- Divided sections of `OSDMap::calc_pg_upmaps` into their own separate functions
- Renamed tmp to tmp_osd_map
- Changed all the occurances of 'first' and 'second' in the function to more meaningful names.
Signed-off-by: Josh Salomon <josh.salomon@gmail.com>
c9dcf1c to
86d6d11
Compare
|
The commit in this PR now contains all of the refactor changes for Quincy (changes that were previously spread across commits from src/osd/OSDMap.h/cc and src/tools/osdmaptoolcc). #44565 contains the doc commit, which can be merged after the Quincy feature freeze this Friday. |
|
@xiexingguo if you have a chance to review this, it would be great to have a +1. |
balancer: Balancer code refactoring
This is the first PR in a series of PRs that aim at adding primary balancer to Ceph and improving the current upmap balancer functionality. This first PR focuses on simplifying (refactoring) the code of calc_pg_upmaps so it is easier to change in the future. This PR keeps the existing functionality as-is and does not change anything but the code structure.
See issue in https://bugzilla.redhat.com/show_bug.cgi?id=1870804
See more info in https://github.com/JoshSalomon/ceph/blob/wip-primary-balancer/doc/dev/prim-balancer-design.rst
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox