]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mon/MonClient.cc
Import ceph 15.2.8
[ceph.git] / ceph / src / mon / MonClient.cc
index 139c18eb1dbab540f7853a0b74047723655f9afa..25c58b0b1cefcc92f9c11d723a0ba4a8761ea418 100644 (file)
@@ -420,6 +420,8 @@ void MonClient::handle_monmap(MMonMap *m)
     }
   }
 
+  cct->set_mon_addrs(monmap);
+
   sub.got("monmap", monmap.get_epoch());
   map_cond.notify_all();
   want_monmap = false;
@@ -1321,7 +1323,8 @@ void MonClient::start_mon_command(const std::vector<string>& cmd,
   r->poutbl = outbl;
   r->prs = outs;
   r->onfinish = onfinish;
-  if (cct->_conf->rados_mon_op_timeout > 0) {
+  auto timeout = cct->_conf.get_val<std::chrono::seconds>("rados_mon_op_timeout");
+  if (timeout.count() > 0) {
     class C_CancelMonCommand : public Context
     {
       uint64_t tid;
@@ -1333,7 +1336,7 @@ void MonClient::start_mon_command(const std::vector<string>& cmd,
       }
     };
     r->ontimeout = new C_CancelMonCommand(r->tid, this);
-    timer.add_event_after(cct->_conf->rados_mon_op_timeout, r->ontimeout);
+    timer.add_event_after(static_cast<double>(timeout.count()), r->ontimeout);
   }
   mon_commands[r->tid] = r;
   _send_command(r);