From: John Spray Date: Thu, 27 Jul 2017 15:46:40 +0000 (-0400) Subject: messages: `services` in MMgrBeacon X-Git-Tag: v12.2.2~61^2~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a6b87a8e7c859607d4554833c5f9ad4cb2fea187;p=ceph.git messages: `services` in MMgrBeacon Signed-off-by: John Spray (cherry picked from commit 236841b3b62af92ce0c4852045327fcfbc5c1651) --- diff --git a/src/messages/MMgrBeacon.h b/src/messages/MMgrBeacon.h index c877afc1524..5def13c1491 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); + } } };