summaryrefslogtreecommitdiffstats
path: root/src/mgr/DaemonServer.h
diff options
context:
space:
mode:
authorNoah Watkins <nwatkins@redhat.com>2018-07-26 19:52:34 +0200
committerNoah Watkins <nwatkins@redhat.com>2018-07-27 21:27:31 +0200
commit3068c4290166076093119d1dc08a2c0fada8235f (patch)
tree824c3f074306d57b0f2332a23ddbbbad11efd531 /src/mgr/DaemonServer.h
parentmgr: remove unused timer member (diff)
downloadceph-3068c4290166076093119d1dc08a2c0fada8235f.tar.xz
ceph-3068c4290166076093119d1dc08a2c0fada8235f.zip
mgr: report health check changes immediately
Currently beacons and reports are sent periodically, which means that health check changes made by modules are only visible to the monitor after a delay. This patch sends a health report immediately after a change occurs. 1. decouple scheduling of reports from beacons 2. moves report scheduling into DaemonServer 3. exposes a "send now" option 4. health check change detection triggers immediate report Signed-off-by: Noah Watkins <nwatkins@redhat.com>
Diffstat (limited to 'src/mgr/DaemonServer.h')
-rw-r--r--src/mgr/DaemonServer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mgr/DaemonServer.h b/src/mgr/DaemonServer.h
index 26554a47283..e7a7658cb71 100644
--- a/src/mgr/DaemonServer.h
+++ b/src/mgr/DaemonServer.h
@@ -21,6 +21,7 @@
#include "common/Mutex.h"
#include "common/LogClient.h"
+#include "common/Timer.h"
#include <msg/Messenger.h>
#include <mon/MonClient.h>
@@ -103,6 +104,12 @@ private:
std::set<int32_t> reported_osds;
void maybe_ready(int32_t osd_id);
+ SafeTimer timer;
+ bool shutting_down;
+ Context *tick_event;
+ void tick();
+ void schedule_tick_locked(double delay_sec);
+
public:
int init(uint64_t gid, entity_addrvec_t client_addrs);
void shutdown();
@@ -147,6 +154,8 @@ public:
virtual const char** get_tracked_conf_keys() const override;
virtual void handle_conf_change(const ConfigProxy& conf,
const std::set <std::string> &changed) override;
+
+ void schedule_tick(double delay_sec);
};
#endif