From dc2a546c6bf8a851ed98aa4e53f9b4de7daf5f6a Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Thu, 1 Apr 2021 10:55:36 +0200 Subject: [PATCH] mon/MonClient: reset auth state in shutdown() Destroying AuthClientHandler and not resetting global_id is another way to get MonClient to send CEPHX_GET_AUTH_SESSION_KEY requests with CephXAuthenticate::old_ticket not populated. This is particularly pertinent to get_monmap_and_config() which shuts down the bootstrap MonClient between retry attempts. Signed-off-by: Ilya Dryomov (cherry picked from commit c9b022e07392979e7f9ea6c11484a7dd872cc235) --- src/mon/MonClient.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index d57075f5797a4..8c8ddca4c065b 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -492,7 +492,11 @@ void MonClient::shutdown() active_con.reset(); pending_cons.clear(); + auth.reset(); + global_id = 0; + authenticate_err = 0; + authenticated = false; monc_lock.Unlock(); -- 2.39.5