From: Sage Weil Date: Tue, 14 Mar 2017 13:56:56 +0000 (-0400) Subject: mgr/Session: keep inst, not addr X-Git-Tag: v12.0.2~252^2~22 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=21297a65a50fa2b81efa8f8fe3169f928eaf7011;p=ceph-ci.git mgr/Session: keep inst, not addr For parity with log messages from other daemons etc. Signed-off-by: Sage Weil --- diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index b6e2bc6079b..429db5faa53 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -128,7 +128,7 @@ bool DaemonServer::ms_verify_authorizer(Connection *con, } MgrSessionRef s(new MgrSession); - s->addr = con->get_peer_addr(); + s->inst.addr = con->get_peer_addr(); AuthCapsInfo caps_info; is_valid = handler->verify_authorizer( @@ -383,6 +383,8 @@ bool DaemonServer::handle_command(MCommand *m) return true; } session->put(); // SessionRef takes a ref + if (session->inst.name == entity_name_t()) + session->inst.name = m->get_source(); string format; boost::scoped_ptr f; diff --git a/src/mgr/MgrSession.h b/src/mgr/MgrSession.h index 39b3dff7023..328871d2ef9 100644 --- a/src/mgr/MgrSession.h +++ b/src/mgr/MgrSession.h @@ -16,7 +16,7 @@ struct MgrSession : public RefCountedObject { uint64_t global_id = 0; EntityName entity_name; - entity_addr_t addr; + entity_inst_t inst; // mon caps are suitably generic for mgr MonCap caps;