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
mon, osd: fix potential collided *Up Set* after PG remapping #20653
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xiexingguo
force-pushed
the
wip-fix-upmap
branch
2 times, most recently
from
March 1, 2018 02:17
818ac40
to
cb43d0f
Compare
liewegas
approved these changes
Mar 1, 2018
A unit test for this would be great: install an invalid mapping and assert that it removes it. Probably in src/test/osd/TestOSDMap.cc? |
Please add Fixes: http://tracker.ceph.com/issues/23118 to the commit message? |
xiexingguo
force-pushed
the
wip-fix-upmap
branch
2 times, most recently
from
March 1, 2018 11:21
6a0f993
to
9c9da3d
Compare
The mgr balancer module are basically doing optimizations based on the snapshots of OSDMap at certain moments, which turns out to be the culprit of data loss since it can produce bad PG mapping results sometimes while in upmap mode. I.e.: 1) original cluster topology: -5 2.00000 host host-a 0 ssd 1.00000 osd.0 up 1.00000 1.00000 1 ssd 1.00000 osd.1 up 1.00000 1.00000 -7 2.00000 host host-b 2 ssd 1.00000 osd.2 up 1.00000 1.00000 3 ssd 1.00000 osd.3 up 1.00000 1.00000 -9 2.00000 host host-c 4 ssd 1.00000 osd.4 up 1.00000 1.00000 5 ssd 1.00000 osd.5 up 1.00000 1.00000 2) mgr balancer applies optimization for PG 3.f: pg-upmap-items[3.f : 1->4] 3.f [1 3] + -------------------------> [4 3] 3) osd.3 is out/reweighted etc., original crush mapping of 3.f changed (while pg-upmap-items did not): pg-upmap-items[3.f : 1->4] 3.f [1 5] + -------------------------> [4 5] 4) we are now mapping PG 3.f to two OSDs(osd.4 & osd.5) on the same host (host-c). Fix the above problem by putting a guard procedure before we can finally encode these *unsafe* upmap remappings into OSDMap. If any of them turns out to be inappropriate, we can simply cancel it since balancer can still re-calculate and re-generate later if necessary. Fixes: http://tracker.ceph.com/issues/23118 Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
xiexingguo
force-pushed
the
wip-fix-upmap
branch
from
March 1, 2018 11:36
9c9da3d
to
5fa467e
Compare
@liewegas All addresed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The mgr balancer module are basically doing optimizations based on
the snapshots of OSDMap at certain moments, which turns out to be
the culprit of data loss since it can produce bad PG mapping results
sometimes while in upmap mode.
I.e.:
(while pg-upmap-items did not):
(host-c).
Fix the above problem by putting a guard procedure before we can
finally encode these unsafe upmap remappings into OSDMap.
If any of them turns out to be inappropriate, we can simply cancel it
since balancer can still re-calculate and re-generate later if necessary.
Fixes: http://tracker.ceph.com/issues/23118
Signed-off-by: xie xingguo xie.xingguo@zte.com.cn