#include <random>
#include "include/scope_guard.h"
+#include "include/stringify.h"
#include "messages/MMonGetMap.h"
#include "messages/MMonGetVersion.h"
#include "messages/MMonGetVersionReply.h"
#include "messages/MMonMap.h"
+#include "messages/MConfig.h"
#include "messages/MAuth.h"
#include "messages/MLogAck.h"
#include "messages/MAuthReply.h"
case CEPH_MSG_MON_GET_VERSION_REPLY:
case MSG_MON_COMMAND_ACK:
case MSG_LOGACK:
+ case MSG_CONFIG:
break;
default:
return false;
m->put();
}
break;
+ case MSG_CONFIG:
+ handle_config(static_cast<MConfig*>(m));
+ break;
}
return true;
}
want_monmap = false;
}
+void MonClient::handle_config(MConfig *m)
+{
+ ldout(cct,10) << __func__ << " " << *m << dendl;
+ cct->_conf->set_mon_vals(cct, m->config);
+ m->put();
+}
+
// ----------------------
int MonClient::init()
}
_sub_want("monmap", monmap.get_epoch() ? monmap.get_epoch() + 1 : 0, 0);
+ _sub_want("config", 0, 0);
if (!_opened())
_reopen_session();
class MMonMap;
+class MConfig;
class MMonGetVersionReply;
struct MMonSubscribeAck;
class MMonCommandAck;
bool ms_handle_refused(Connection *con) override { return false; }
void handle_monmap(MMonMap *m);
+ void handle_config(MConfig *m);
void handle_auth(MAuthReply *m);