From: Patrick Donnelly Date: Wed, 20 Aug 2025 01:36:34 +0000 (-0400) Subject: auth: add debugging for client cephx methods X-Git-Tag: testing/wip-pdonnell-testing-20260126.152838~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cca8abadf7385441dadecee66fce4a9f65a7b67e;p=ceph-ci.git auth: add debugging for client cephx methods In particular, to see when an auth helper is created/destroyed. Signed-off-by: Patrick Donnelly --- diff --git a/src/auth/cephx/CephxClientHandler.cc b/src/auth/cephx/CephxClientHandler.cc index 73486bdebc7..42153fd04e6 100644 --- a/src/auth/cephx/CephxClientHandler.cc +++ b/src/auth/cephx/CephxClientHandler.cc @@ -27,12 +27,27 @@ #define dout_subsys ceph_subsys_auth #undef dout_prefix -#define dout_prefix *_dout << "cephx client: " +#define dout_prefix *_dout << "cephx_client(" << this << "): " using std::string; using ceph::bufferlist; +CephxClientHandler::CephxClientHandler(CephContext *cct_, RotatingKeyRing *rsecrets) + : AuthClientHandler(cct_), + tickets(cct_), + rotating_secrets(rsecrets), + keyring(rsecrets->get_keyring()) +{ + ldout(cct, 20) << "con" << dendl; + reset(); +} + +CephxClientHandler::~CephxClientHandler() +{ + ldout(cct, 20) << "des" << dendl; +} + void CephxClientHandler::reset() { ldout(cct,10) << __func__ << dendl; diff --git a/src/auth/cephx/CephxClientHandler.h b/src/auth/cephx/CephxClientHandler.h index c71d403837a..ee50f5c876e 100644 --- a/src/auth/cephx/CephxClientHandler.h +++ b/src/auth/cephx/CephxClientHandler.h @@ -24,30 +24,20 @@ class KeyRing; class CephxClientHandler : public AuthClientHandler { - bool starting; + bool starting = false; /* envelope protocol parameters */ - uint64_t server_challenge; + uint64_t server_challenge = 0; CephXTicketManager tickets; - CephXTicketHandler* ticket_handler; + CephXTicketHandler* ticket_handler = nullptr; - RotatingKeyRing* rotating_secrets; - KeyRing *keyring; + RotatingKeyRing* rotating_secrets = nullptr; + KeyRing *keyring = nullptr; public: - CephxClientHandler(CephContext *cct_, - RotatingKeyRing *rsecrets) - : AuthClientHandler(cct_), - starting(false), - server_challenge(0), - tickets(cct_), - ticket_handler(NULL), - rotating_secrets(rsecrets), - keyring(rsecrets->get_keyring()) - { - reset(); - } + CephxClientHandler(CephContext *cct_, RotatingKeyRing *rsecrets); + ~CephxClientHandler(); CephxClientHandler* clone() const override { return new CephxClientHandler(*this);