]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not authenticate heartbeat connections until nautilus 24095/head
authorSage Weil <sage@redhat.com>
Mon, 15 Oct 2018 12:35:24 +0000 (07:35 -0500)
committerSage Weil <sage@redhat.com>
Mon, 15 Oct 2018 20:01:40 +0000 (15:01 -0500)
Some (currently) pre-nautilus OSDs will crash if you try to authenticate
a heartbeat connection but they are not expecting it:

src/auth/Crypto.h: 109: FAILED assert(ckh)
 ceph version 12.2.8-457-gccd69ef (ccd69ef36aafebab964a2e47e249fdb95e083e46) luminous (stable)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x110) [0x5618b04aaea0]
 2: (()+0x41cbec) [0x5618afe2cbec]
 3: (CephxSessionHandler::_calc_signature(Message*, unsigned long*)+0x8c5) [0x5618b0777ba5]
 4: (CephxSessionHandler::check_message_signature(Message*)+0x7d) [0x5618b077800d]
 5: (AsyncConnection::process()+0x1b44) [0x5618b0761a04]
 6: (EventCenter::process_events(int, std::chrono::duration<unsigned long, std::ratio<1l, 1000000000l> >*)+0x359) [0x5618b0546079]
 7: (()+0xb38c3e) [0x5618b0548c3e]
 8: (()+0xb5070) [0x7ff04faf5070]
 9: (()+0x7dd5) [0x7ff050168dd5]
 10: (clone()+0x6d) [0x7ff04f259b3d]

See http://tracker.ceph.com/issues/36443

It won't be fixed in all clusters before upgrade to nautilus, though, so
we also need to work around it here.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.h

index cdd920dd02e98d7690bc4f5cee0d93c55865f54b..ba5465af21dc13bce4797d047bb21ef531ef5e2d 100644 (file)
@@ -1656,7 +1656,13 @@ public:
     }
     bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer,
                           bool force_new) override {
-      return osd->ms_get_authorizer(dest_type, authorizer, force_new);
+      // some pre-nautilus OSDs get confused if you include an
+      // authorizer but they are not expecting it.  do not try to authorize
+      // heartbeat connections until all OSDs are nautilus.
+      if (osd->get_osdmap()->require_osd_release >= CEPH_RELEASE_NAUTILUS) {
+       return osd->ms_get_authorizer(dest_type, authorizer, force_new);
+      }
+      return false;
     }
     KeyStore *ms_get_auth1_authorizer_keystore() override {
       return osd->ms_get_auth1_authorizer_keystore();