From: Shinobu Kinjo Date: Sat, 4 Nov 2017 01:28:50 +0000 (+0900) Subject: mgr/DaemonServer.cc: [Cleanup] Change to using get_val template X-Git-Tag: v13.0.2~473^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4f8d5ef6808ab2ddcbdedf1699ada99328a76eff;p=ceph.git mgr/DaemonServer.cc: [Cleanup] Change to using get_val template function Signed-off-by: Shinobu Kinjo --- diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 42132d726022..ba24a56804ea 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -111,9 +111,10 @@ int DaemonServer::init(uint64_t gid, entity_addr_t client_addr) mon_byte_throttler.get(), mon_msg_throttler.get()); - int r = msgr->bind(g_conf->public_addr); + entity_addr_t paddr = g_conf->get_val("public_addr"); + int r = msgr->bind(paddr); if (r < 0) { - derr << "unable to bind mgr to " << g_conf->public_addr << dendl; + derr << "unable to bind mgr to " << paddr << dendl; return r; } @@ -893,14 +894,15 @@ bool DaemonServer::handle_command(MCommand *m) cmdctx->reply(r, ss); return true; } - double max_change = g_conf->mon_reweight_max_change; + + double max_change = g_conf->get_val("mon_reweight_max_change"); cmd_getval(g_ceph_context, cmdctx->cmdmap, "max_change", max_change); if (max_change <= 0.0) { ss << "max_change " << max_change << " must be positive"; cmdctx->reply(-EINVAL, ss); return true; } - int64_t max_osds = g_conf->mon_reweight_max_osds; + int64_t max_osds = g_conf->get_val("mon_reweight_max_osds"); cmd_getval(g_ceph_context, cmdctx->cmdmap, "max_osds", max_osds); if (max_osds <= 0) { ss << "max_osds " << max_osds << " must be positive";