]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: fix split vs reconnect race 23850/head
authorSage Weil <sage@redhat.com>
Sat, 1 Sep 2018 20:48:37 +0000 (15:48 -0500)
committerSage Weil <sage@redhat.com>
Sat, 1 Sep 2018 20:48:37 +0000 (15:48 -0500)
If we are reconnecting to an OSD, we may not have a connection established
so this feature check is completely unreliable.  If there happens to be a
split, that could mean we don't resend an op that should have been resent.

Instead, we can infer the OSD has the new behavior if require_osd_release
is luminous or later.  If not, we can look at the per-osd features in the
OSDMap.

Fixes: http://tracker.ceph.com/issues/22544
Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc

index ff7db68156fcdbd33a10ef9be7ca0667d9c9e1d3..011c80c5130c599b7b2c96728fba654e7d6f3cbf 100644 (file)
@@ -2973,7 +2973,10 @@ int Objecter::_calc_target(op_target_t *t, Connection *con, bool any_change)
   if (legacy_change || unpaused || force_resend) {
     return RECALC_OP_TARGET_NEED_RESEND;
   }
-  if (split && con && con->has_features(CEPH_FEATUREMASK_RESEND_ON_SPLIT)) {
+  if (split &&
+      (osdmap->require_osd_release >= CEPH_RELEASE_LUMINOUS ||
+       HAVE_FEATURE(osdmap->get_xinfo(acting_primary).features,
+                   RESEND_ON_SPLIT))) {
     return RECALC_OP_TARGET_NEED_RESEND;
   }
   return RECALC_OP_TARGET_NO_ACTION;