]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
messages: make room for passing supported monitor commands in MMonElection
authorGreg Farnum <greg@inktank.com>
Fri, 6 Dec 2013 21:13:03 +0000 (13:13 -0800)
committerGreg Farnum <greg@inktank.com>
Mon, 9 Dec 2013 19:26:03 +0000 (11:26 -0800)
We're going to use this space to let leader tell everybody what
commands it supports.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/messages/MMonElection.h

index 3d7dd4ec90ef12e6858d554a5c6538dc7c54a83c..ea55bbdb45345479cedb635bb133dabc49e7d544 100644 (file)
@@ -21,7 +21,7 @@
 
 class MMonElection : public Message {
 
-  static const int HEAD_VERSION = 4;
+  static const int HEAD_VERSION = 5;
   static const int COMPAT_VERSION = 2;
 
 public:
@@ -49,6 +49,7 @@ public:
    * on user cluster, so we've left them in for compatibility. */
   version_t defunct_one;
   version_t defunct_two;
+  bufferlist commands;
   
   MMonElection() : Message(MSG_MON_ELECTION, HEAD_VERSION, COMPAT_VERSION),
     op(0), epoch(0), quorum_features(0), defunct_one(0),
@@ -90,6 +91,7 @@ public:
     ::encode(quorum_features, payload);
     ::encode(defunct_one, payload);
     ::encode(defunct_two, payload);
+    ::encode(commands, payload);
   }
   void decode_payload() {
     bufferlist::iterator p = payload.begin();
@@ -109,6 +111,8 @@ public:
       ::decode(defunct_one, p);
       ::decode(defunct_two, p);
     }
+    if (header.version >= 5)
+      ::decode(commands, p);
   }
   
 };