From 3e53e47e6bf13281d62af7a70ec4536a0af95b4c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 2 May 2017 10:49:28 -0500 Subject: [PATCH] osd: fix legacy pg create conditions 1- in reality we don't really care if pg_temp is set. 2- compare against acting_primary since that's what actually matters. Signed-off-by: Sage Weil --- src/osd/OSD.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d1bb2d96445..e8dd184e24e 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -7926,16 +7926,9 @@ void OSD::handle_pg_create(OpRequestRef op) osdmap->pg_to_up_acting_osds(on, &up, &up_primary, &acting, &acting_primary); int role = osdmap->calc_pg_role(whoami, acting, acting.size()); - if (up_primary != whoami) { - dout(10) << "mkpg " << on << " not primary (role=" - << role << "), skipping" << dendl; - continue; - } - if (up != acting) { - dout(10) << "mkpg " << on << " up " << up - << " != acting " << acting << ", ignoring" << dendl; - // we'll get a query soon anyway, since we know the pg - // must exist. we can ignore this. + if (acting_primary != whoami) { + dout(10) << "mkpg " << on << " not acting_primary (" << acting_primary + << "), my role=" << role << ", skipping" << dendl; continue; } -- 2.39.5