]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: s/client_msgr/public_msgr/
authorKefu Chai <kchai@redhat.com>
Thu, 31 Jan 2019 04:43:56 +0000 (12:43 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 2 Feb 2019 05:20:00 +0000 (13:20 +0800)
because this messenger also serves requests from librados clients.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd.cc
src/crimson/osd/osd.h

index 8dc8350bacb044b2e878e55396f5728cbdd86bf8..45c461fd8b88e5018200b3244a565a78ee43c1fa 100644 (file)
@@ -32,11 +32,11 @@ OSD::OSD(int id, uint32_t nonce)
   : whoami{id},
     cluster_msgr{new ceph::net::SocketMessenger{entity_name_t::OSD(whoami),
                                                 "cluster", nonce}},
-    client_msgr{new ceph::net::SocketMessenger{entity_name_t::OSD(whoami),
+    public_msgr{new ceph::net::SocketMessenger{entity_name_t::OSD(whoami),
                                                "client", nonce}},
-    monc{*client_msgr}
+    monc{*public_msgr},
 {
-  for (auto msgr : {cluster_msgr.get(), client_msgr.get()}) {
+  for (auto msgr : {cluster_msgr.get(), public_msgr.get()}) {
     if (local_conf()->ms_crc_data) {
       msgr->set_crc_data();
     }
@@ -126,7 +126,7 @@ seastar::future<> OSD::start()
     osdmap = std::move(map);
     return load_pgs();
   }).then([this] {
-    return client_msgr->start(&dispatchers);
+    return public_msgr->start(&dispatchers);
   }).then([this] {
     return monc.start();
   }).then([this] {
@@ -204,7 +204,7 @@ seastar::future<> OSD::stop()
   return gate.close().then([this] {
     return monc.stop();
   }).then([this] {
-    return client_msgr->shutdown();
+    return public_msgr->shutdown();
   });
 }
 
@@ -458,7 +458,7 @@ seastar::future<> OSD::committed_osd_maps(version_t first,
       osdmap = o;
       if (up_epoch != 0 &&
           osdmap->is_up(whoami) &&
-          osdmap->get_addrs(whoami) == client_msgr->get_myaddrs()) {
+          osdmap->get_addrs(whoami) == public_msgr->get_myaddrs()) {
         up_epoch = osdmap->get_epoch();
         if (!boot_epoch) {
           boot_epoch = osdmap->get_epoch();
@@ -467,7 +467,7 @@ seastar::future<> OSD::committed_osd_maps(version_t first,
     });
   }).then([m, this] {
     if (osdmap->is_up(whoami) &&
-        osdmap->get_addrs(whoami) == client_msgr->get_myaddrs() &&
+        osdmap->get_addrs(whoami) == public_msgr->get_myaddrs() &&
         bind_epoch < osdmap->get_up_from(whoami)) {
       if (state.is_booting()) {
         logger().info("osd.{}: activating...", whoami);
@@ -511,11 +511,11 @@ bool OSD::should_restart() const
     logger().info("map e {} marked osd.{} down",
                   osdmap->get_epoch(), whoami);
     return true;
-  } else if (osdmap->get_addrs(whoami) != client_msgr->get_myaddrs()) {
+  } else if (osdmap->get_addrs(whoami) != public_msgr->get_myaddrs()) {
     logger().error("map e {} had wrong client addr ({} != my {})",
                    osdmap->get_epoch(),
                    osdmap->get_addrs(whoami),
-                   client_msgr->get_myaddrs());
+                   public_msgr->get_myaddrs());
     return true;
   } else if (osdmap->get_cluster_addrs(whoami) != cluster_msgr->get_myaddrs()) {
     logger().error("map e {} had wrong cluster addr ({} != my {})",
index ea75b0e98e1a87d6b1dab326f7046868b26b674e..51af15256d9933a872b55706b0c68299e615401a 100644 (file)
@@ -41,8 +41,8 @@ class OSD : public ceph::net::Dispatcher,
   const int whoami;
   // talk with osd
   std::unique_ptr<ceph::net::Messenger> cluster_msgr;
-  // talk with mon/mgr
-  std::unique_ptr<ceph::net::Messenger> client_msgr;
+  // talk with client/mon/mgr
+  std::unique_ptr<ceph::net::Messenger> public_msgr;
   ChainedDispatchers dispatchers;
   ceph::mon::Client monc;