]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: remove SimpleMessenger::get_ms_addr() in favor of Messenger::get_myaddr
authorGreg Farnum <gregory.farnum@dreamhost.com>
Sat, 3 Mar 2012 00:08:15 +0000 (16:08 -0800)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 7 Mar 2012 21:54:39 +0000 (13:54 -0800)
And fix the comments on set_ip.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Reviewed-by: Sage Weil <sage.weil@dreamhost.com>
src/ceph_mds.cc
src/ceph_osd.cc
src/librados.cc
src/msg/SimpleMessenger.h

index bfa3698e6c9822b6ebe0873cbdbd77962b42d3f9..61e790183fb669df162c6166409b768196638148 100644 (file)
@@ -236,7 +236,7 @@ int main(int argc, const char **argv)
                                                    getpid());
   messenger->set_cluster_protocol(CEPH_MDS_PROTOCOL);
 
-  cout << "starting " << g_conf->name << " at " << messenger->get_ms_addr()
+  cout << "starting " << g_conf->name << " at " << messenger->get_myaddr()
        << std::endl;
   uint64_t supported =
     CEPH_FEATURE_UID |
index 61aefde8641013e66f90b9a8e55847fa33592096..e883e6016deb35d6aece4600f22b54c1995f3a82 100644 (file)
@@ -319,7 +319,7 @@ int main(int argc, const char **argv)
   global_print_banner();
 
   cout << "starting osd." << whoami
-       << " at " << client_messenger->get_ms_addr()
+       << " at " << client_messenger->get_myaddr()
        << " osd_data " << g_conf->osd_data
        << " " << ((g_conf->osd_journal.empty()) ?
                    "(no journal)" : g_conf->osd_journal)
index 3e8084b8b87c8ec583480223229cc113d500281a..b8fc434f02c8fb402d2f981ff0920d9d26e98fcc 100644 (file)
@@ -1016,7 +1016,7 @@ int librados::RadosClient::connect()
   // how to decompose the reply data into its consituent pieces.
   messenger->set_default_policy(Messenger::Policy::client(0, CEPH_FEATURE_OSDREPLYMUX));
 
-  ldout(cct, 1) << "starting msgr at " << messenger->get_ms_addr() << dendl;
+  ldout(cct, 1) << "starting msgr at " << messenger->get_myaddr() << dendl;
 
   ldout(cct, 1) << "starting objecter" << dendl;
 
index 3831dad39ae920e880767818b9d32e9737e6b855..55f93081148a531dc1bdc57b23c936fa60f6f267 100644 (file)
@@ -57,17 +57,15 @@ public:
    * @{
    */
   /**
-   * Set the IP this Messenger should currently be using.
-   * This function should probably be removed in favor of making bind()
-   * more intelligent in the case where it actually does set an address
-   * to bind to.
+   * Set the IP this SimpleMessenger is using. This is useful if it's unset
+   * but another SimpleMessenger on the same interface has already learned its
+   * IP. Of course, this function does not change the port, since the
+   * SimpleMessenger always knows the correct setting for that.
+   * If the SimpleMesssenger's IP is already set, this function is a no-op.
+   *
+   * @param addr The IP address to set internally.
    */
   void set_ip(entity_addr_t& addr);
-  /**
-   * Retrieve the address as a reference. This function should be removed
-   * in favor of Messenger::get_myaddr().
-   */
-  const entity_addr_t &get_ms_addr() { return ms_addr; }
   /**
    * Retrieve the Messenger's address.
    *