From: Sage Weil Date: Fri, 26 Oct 2018 21:38:31 +0000 (-0500) Subject: msg/async: print socket_addr for the connection X-Git-Tag: v14.1.0~484^2~103 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3031a65cbb9a7946849607bc435b0317aaf15dac;p=ceph.git msg/async: print socket_addr for the connection When we bind to multiple addrs, print the one the current connection is using for the given connection. Signed-off-by: Sage Weil --- diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index fa28e936065..1157857a9ed 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -36,7 +36,7 @@ #undef dout_prefix #define dout_prefix _conn_prefix(_dout) ostream& AsyncConnection::_conn_prefix(std::ostream *_dout) { - return *_dout << "-- " << async_msgr->get_myaddrs() << " >> " + return *_dout << "-- " << socket_addr << " >> " << target_addr << " conn(" << this << (msgr2 ? " msgr2" : " legacy") << " :" << port diff --git a/src/msg/async/ProtocolV1.cc b/src/msg/async/ProtocolV1.cc index 12f1c307c1e..ca3a801e491 100644 --- a/src/msg/async/ProtocolV1.cc +++ b/src/msg/async/ProtocolV1.cc @@ -1788,7 +1788,7 @@ CtPtr ProtocolV1::handle_client_banner(char *buffer, int r) { if (peer_addr.is_blank_ip()) { // peer apparently doesn't know what ip they have; figure it out for them. int port = peer_addr.get_port(); - peer_addr.u = connection->target_addr.u; + peer_addr.u = connection->socket_addr.u; peer_addr.set_port(port); ldout(cct, 0) << __func__ << " accept peer addr is really " << peer_addr diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index ef8f4d83593..c0a3e55d9da 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -11,8 +11,8 @@ #undef dout_prefix #define dout_prefix _conn_prefix(_dout) ostream &ProtocolV2::_conn_prefix(std::ostream *_dout) { - return *_dout << "-- " << messenger->get_myaddrs().legacy_addr() << " >> " - << connection->peer_addrs.legacy_addr() << " conn(" + return *_dout << "-- " << connection->socket_addr << " >> " + << connection->target_addr << " conn(" << connection << (connection->msgr2 ? " msgr2" : " legacy") << " :" << connection->port << " s=" << get_state_name(state) << " pgs=" << peer_global_seq << " cs=" << connect_seq