]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/MonClient: drop my_addr
authorKefu Chai <kchai@redhat.com>
Fri, 15 Feb 2019 15:11:07 +0000 (23:11 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 15 Feb 2019 15:14:32 +0000 (23:14 +0800)
the only consumer of this member variable is MgrStandby, and MgrStandby
does have access to the messenger. so let it get the IP address
directly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/MgrStandby.cc
src/mon/MonClient.cc
src/mon/MonClient.h

index f055ce2883797efddc8a6996562697c5eb341499..a2767be7abdab401dc80ef8578e5f938312281f3 100644 (file)
@@ -216,7 +216,8 @@ void MgrStandby::send_beacon()
   dout(10) << "sending beacon as gid " << monc.get_global_id() << dendl;
 
   map<string,string> metadata;
-  metadata["addr"] = monc.get_my_addr().ip_only_to_str();
+#warning fixme, report addrs instead
+  metadata["addr"] = client_messenger->get_myaddr_legacy().ip_only_to_str();
   collect_sys_info(&metadata, g_ceph_context);
 
   MMgrBeacon *m = new MMgrBeacon(monc.get_fsid(),
index a739e7166478e2966360a1f956e73c003992f1c6..e366805a9fb76dc6545bf56fb2cd8a8eef5a3749 100644 (file)
@@ -271,10 +271,6 @@ int MonClient::ping_monitor(const string &mon_id, string *result_reply)
 
 bool MonClient::ms_dispatch(Message *m)
 {
-#warning fixme, my_addr should be entity_addrvec_t my_addrs
-  if (my_addr == entity_addr_t())
-    my_addr = messenger->get_myaddr_legacy();
-
   // we only care about these message types
   switch (m->get_type()) {
   case CEPH_MSG_MON_MAP:
index ee1e9bb20a1c99715892f0cde28e1c1bf88f6f4c..c5e65983d364cb672c1827df462075c83a89a5c6 100644 (file)
@@ -246,8 +246,6 @@ private:
 
   EntityName entity_name;
 
-  entity_addr_t my_addr;
-
   mutable Mutex monc_lock;
   SafeTimer timer;
   Finisher finisher;
@@ -467,10 +465,6 @@ public:
     _reopen_session();
   }
 
-  entity_addr_t get_my_addr() const {
-    return my_addr;
-  }
-
   const uuid_d& get_fsid() const {
     return monmap.fsid;
   }