osd will send beacon message to monitor periodically to inform it that
"i am still alive!", previously, monitor use the pg-stats to check the
status of OSD, but since osd will only send pg stat to mgr after
luminous, we use a dedicated msg for this purpose.
Signed-off-by: Kefu Chai <kchai@redhat.com>
--- /dev/null
+#pragma once
+
+class MOSDBeacon : public PaxosServiceMessage {
+public:
+ MOSDBeacon(epoch_t e = 0)
+ : PaxosServiceMessage(MSG_OSD_BEACON, e)
+ {}
+ void encode_payload(uint64_t features) override {
+ paxos_encode();
+ }
+ void decode_payload() override {
+ bufferlist::iterator p = payload.begin();
+ paxos_decode(p);
+ }
+ const char *get_type_name() const override { return "osd_beacon"; }
+ void print(ostream &out) const {
+ out << get_type_name();
+ }
+};
#include "messages/MOSDBoot.h"
#include "messages/MOSDAlive.h"
+#include "messages/MOSDBeacon.h"
#include "messages/MOSDPGTemp.h"
#include "messages/MOSDFailure.h"
#include "messages/MOSDMarkMeDown.h"
case MSG_OSD_ALIVE:
m = new MOSDAlive();
break;
+ case MSG_OSD_BEACON:
+ m = new MOSDBeacon();
+ break;
case MSG_OSD_PGTEMP:
m = new MOSDPGTemp;
break;
#define MSG_OSD_PGTEMP 78
+#define MSG_OSD_BEACON 79
+
#define MSG_OSD_PG_NOTIFY 80
#define MSG_OSD_PG_QUERY 81
#define MSG_OSD_PG_LOG 83