From a6b87a8e7c859607d4554833c5f9ad4cb2fea187 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 27 Jul 2017 11:46:40 -0400 Subject: [PATCH] messages: `services` in MMgrBeacon Signed-off-by: John Spray (cherry picked from commit 236841b3b62af92ce0c4852045327fcfbc5c1651) --- src/messages/MMgrBeacon.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/messages/MMgrBeacon.h b/src/messages/MMgrBeacon.h index c877afc152438..5def13c1491c3 100644 --- a/src/messages/MMgrBeacon.h +++ b/src/messages/MMgrBeacon.h @@ -23,7 +23,7 @@ class MMgrBeacon : public PaxosServiceMessage { - static const int HEAD_VERSION = 5; + static const int HEAD_VERSION = 6; static const int COMPAT_VERSION = 1; protected: @@ -35,6 +35,9 @@ protected: std::set available_modules; map metadata; ///< misc metadata about this osd + // From active daemon to populate MgrMap::services + std::map services; + // Only populated during activation std::vector command_descs; @@ -65,6 +68,15 @@ public: return metadata; } + const std::map& get_services() const { + return services; + } + + void set_services(const std::map &svcs) + { + services = svcs; + } + void set_command_descs(const std::vector &cmds) { command_descs = cmds; @@ -98,6 +110,7 @@ public: ::encode(available_modules, payload); ::encode(command_descs, payload); ::encode(metadata, payload); + ::encode(services, payload); } void decode_payload() override { bufferlist::iterator p = payload.begin(); @@ -118,6 +131,9 @@ public: if (header.version >= 5) { ::decode(metadata, p); } + if (header.version >= 6) { + ::decode(services, p); + } } }; -- 2.39.5