Skip to content

Commit f8dad00

Browse files
committed
mon/MonClient: before complete auth with error, reopen session
When monClient try to authenticate and fail with -EAGAIN there is a possibility that we no longer hunting and not have active_con. that will result of disconnecting the monClient and ticks will continue without having open session. the solution is to check at the end of auth, that we don't have -EAGAIN error, and if we do, reopen the session and on the next tick try auth again Fixes: https://tracker.ceph.com/issues/58379 Signed-off-by: Nitzan Mordechai <[email protected]>
1 parent b42a730 commit f8dad00

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/mon/MonClient.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,11 @@ void MonClient::_finish_auth(int auth_err)
709709
if (!auth_err && active_con) {
710710
ceph_assert(auth);
711711
_check_auth_tickets();
712+
} else if (auth_err == -EAGAIN && !active_con) {
713+
ldout(cct,10) << __func__
714+
<< " auth returned EAGAIN, reopening the session to try again"
715+
<< dendl;
716+
_reopen_session();
712717
}
713718
auth_cond.notify_all();
714719
}

0 commit comments

Comments
 (0)