From 2152d8ffb73a507a3d08d48b38c5a8e73f887138 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 15 Oct 2018 07:35:24 -0500 Subject: [PATCH] osd: do not authenticate heartbeat connections until nautilus 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 >*)+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 --- src/osd/OSD.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/osd/OSD.h b/src/osd/OSD.h index cdd920dd02e98..ba5465af21dc1 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -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(); -- 2.39.5