Skip to content
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

osd: subscribe osdmaps if any pending pgs #18916

Merged
merged 1 commit into from Nov 20, 2017

Conversation

Projects
None yet
3 participants
@tchaikov
Copy link
Contributor

commented Nov 14, 2017

subscribe from monitor continously for new osdmaps so osd is able to get
the osdmap instructing it to delete PGs even if nobody is poking it.

Fixes: http://tracker.ceph.com/issues/22113
Signed-off-by: Kefu Chai kchai@redhat.com

osd: subscribe osdmaps if any pending pgs
subscribe from monitor continously for new osdmaps so osd is able to get
the osdmap instructing it to delete PGs even if nobody is poking it.

Fixes: http://tracker.ceph.com/issues/22113
Signed-off-by: Kefu Chai <kchai@redhat.com>

@tchaikov tchaikov requested review from liewegas and jdurgin Nov 14, 2017

if (monc->sub_want_increment("osdmap", start, CEPH_SUBSCRIBE_ONETIME)) {
dout(4) << __func__ << ": re-subscribe osdmap(onetime) since"
<< start << dendl;
do_renew_subs = true;

This comment has been minimized.

Copy link
@liewegas

liewegas Nov 14, 2017

Member

Once we have pending creates and a full subscription, how does it stop the subscription after the pg gets created?

This comment has been minimized.

Copy link
@tchaikov

tchaikov Nov 14, 2017

Author Contributor

@liewegas that's what https://github.com/ceph/ceph/pull/18916/files#diff-fa6c2eba8356ae1442d1bf749beacfdfR4244 is for.

if we don't have more pending pgs, osd will switch to a CEPH_SUBSCRIBE_ONETIME osdmap subscription.

This comment has been minimized.

Copy link
@liewegas

liewegas Nov 14, 2017

Member

what if !(pgtemp || do_sub_pg_creates) thought?

This comment has been minimized.

Copy link
@tchaikov

tchaikov Nov 14, 2017

Author Contributor

@liewegas let me rephrase the code:

if (have_pending_creates) {
  subscribe(osdmap, continuously);
}
if (!have_pending_create) {
  if (pgtemp || do_sub_pg_creates) {
     /// the reason why we don't have pending creates is that
     /// we are about to create the pending pgs, and that means
     /// we've being subscribing the osdmap continuously, so 
     subscribe(osdmap, onetime); 
  } else {
     /// awesome, no pending creates now, and no pending creates **before** calling resume_creating_pg()
  }
}
}

bool do_renew_subs = false;
if (do_sub_pg_creates) {

This comment has been minimized.

Copy link
@songbaisen

songbaisen Nov 16, 2017

look like do_sub_pg_creates always false here?

This comment has been minimized.

Copy link
@tchaikov

tchaikov Nov 16, 2017

Author Contributor

it's set if pending_creates_from_mon > 0. it's not part of this patch.

This comment has been minimized.

Copy link
@songbaisen

@ceph ceph deleted a comment from songbaisen Nov 16, 2017

@liewegas liewegas added the needs-qa label Nov 17, 2017

@liewegas
Copy link
Member

left a comment

lgtm!

@tchaikov tchaikov merged commit 4614251 into ceph:master Nov 20, 2017

5 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
make check (arm64) make check succeeded
Details

@tchaikov tchaikov deleted the tchaikov:wip-22113 branch Nov 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.