]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async: print socket_addr for the connection
authorSage Weil <sage@redhat.com>
Fri, 26 Oct 2018 21:38:31 +0000 (16:38 -0500)
committerSage Weil <sage@redhat.com>
Fri, 21 Dec 2018 21:30:18 +0000 (15:30 -0600)
When we bind to multiple addrs, print the one the current connection is
using for the given connection.

Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/async/AsyncConnection.cc
src/msg/async/ProtocolV1.cc
src/msg/async/ProtocolV2.cc

index fa28e936065d8345b6306399b72a8ec6ccb71ff2..1157857a9ed2ed82ee5f2612d9da7f501a57ce6c 100644 (file)
@@ -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
index 12f1c307c1e2f125ede9eef83757f13ffdc690fa..ca3a801e49163264c1f3ef87fb9d41686dc2f7a4 100644 (file)
@@ -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
index ef8f4d83593c232e577a85f3173f0a308fda9382..c0a3e55d9da6cc15c5aa88487475d860bb6aef61 100644 (file)
@@ -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