]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix legacy pg create conditions
authorSage Weil <sage@redhat.com>
Tue, 2 May 2017 15:49:28 +0000 (10:49 -0500)
committerSage Weil <sage@redhat.com>
Tue, 2 May 2017 15:49:28 +0000 (10:49 -0500)
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 <sage@redhat.com>
src/osd/OSD.cc

index d1bb2d96445eb9fd879e8928c57166efd3b182c1..e8dd184e24eba7209e166ec98e4ef59ca165df6c 100644 (file)
@@ -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;
     }