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 5 commits into from Dec 13, 2018


None yet
5 participants
Copy link

xiexingguo commented Dec 6, 2018

This backports the recent upmap related fixes which have been successfully merged into master:

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

xiexingguo added some commits Jun 20, 2018

osd/ 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/ 4078: FAILED assert(target > 0)

Signed-off-by: xie xingguo <>
(cherry picked from commit 8a11ed4)
osd/ move sanity checks to the proper place
Signed-off-by: xie xingguo <>
(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 <>
(cherry picked from commit 79ef3be)

	- *nextmap* has been renamed to *tmpmap*
mon: auto clean up stale upmap items

Signed-off-by: xie xingguo <>
(cherry picked from commit 4181aa8)

        - *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.

Signed-off-by: xie xingguo <>
Signed-off-by: ningtao <>
(cherry picked from commit f043dcc)

        - *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


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


This comment has been minimized.

Copy link

yuriw commented Dec 10, 2018


This comment has been minimized.

Copy link

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
Signed-off-by all commits in this PR are signed
Unmodified Submodules submodules for project are unmodified
make check make check succeeded

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

Copy link

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