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

mimic: osd: backport recent upmap fixes #25419

Merged
merged 5 commits into from Dec 13, 2018

Conversation

Projects
None yet
5 participants
@xiexingguo
Copy link
Member

xiexingguo commented Dec 6, 2018

https://tracker.ceph.com/issues/37538


This backports the recent upmap related fixes which have been successfully merged into master:
#22630
#25196
#25365

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

xiexingguo added some commits Jun 20, 2018

osd/OSDMap.cc: remove pg_upmap/pg_upmap_items too if osd is gone
If an osd is gone or moved out from the specific crush rule,
we should cancel any pg_upmap/pg_upmap_items still bound to
that osd too.

The original code does not work for the above case because
get_parent_of_type() will fail if that osd does not belong
to the crush_rule passed in and hence hits the assert below:

```
src/osd/OSDMap.cc: 4078: FAILED assert(target > 0)
```

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit 8a11ed4)
osd/OSDMap.cc: move sanity checks to the proper place
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit 3dcd4ea)
osd/OSDMap: add pg-existence sanity check
The reason why __get_pg_pool_size(pg)__ or __get_pg_pool_crush_rule(pg)__ fails is
that the pg does not exist anymore. So it generally makes sense to check __pg_exists(pg)__
before moving further.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit 79ef3be)

Conflicts:
	- *nextmap* has been renamed to *tmpmap*
mon: auto clean up stale upmap items
See https://www.spinics.net/lists/ceph-users/msg49518.html

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit 4181aa8)

Conflicts:
        - *nextmap* has been renamed to *tmpmap*
        - add the *have_pg_upmaps* wrapper which is necessary for unittest
osd/OSDMap: fix upmap mis-killing for erasure-coded PGs
The up-set of erasure-coded PGs may include CRUSH_ITEM_NONE,
which as a result causes mis-killing of valid upmap items.

Fixes: https://tracker.ceph.com/issues/37493
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: ningtao <ningtao@sangfor.com.cn>
(cherry picked from commit f043dcc)

Conflicts:
        - *maybe_remove_pg_upmaps* input changed, in master
          we now have a passed in *nextmap* parameter

@xiexingguo xiexingguo added this to the mimic milestone Dec 6, 2018

@xiexingguo xiexingguo referenced this pull request Dec 6, 2018

Merged

osd/OSDMap: fix upmap mis-killing for erasure-coded PGs #25365

0 of 3 tasks complete

@smithfarm smithfarm added the core label Dec 8, 2018

@smithfarm smithfarm requested a review from liewegas Dec 8, 2018

@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Dec 10, 2018

@neha-ojha

This comment has been minimized.

Copy link
Member

neha-ojha commented Dec 12, 2018

@liewegas this has passed testing, would you like to take a quick look before we merge?

@xiexingguo xiexingguo merged commit a64198e into ceph:mimic Dec 13, 2018

4 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details

@xiexingguo xiexingguo deleted the xiexingguo:wip-mimic-upmap-fixes branch Dec 13, 2018

@liewegas
Copy link
Member

liewegas left a comment

It looks good! Sorry for the slow response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment