]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
messages: fix MMDSBeacon constructor
authorJohn Spray <john.spray@redhat.com>
Mon, 3 Oct 2016 06:40:12 +0000 (07:40 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 10 Oct 2016 11:22:37 +0000 (12:22 +0100)
This was leaving garbage in some fields during decode
when decoding messages with an older version.

Fixes: http://tracker.ceph.com/issues/17466
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit f1fb667dfd21cd241f4f45ce9ef3f8393d114c60)

src/messages/MMDSBeacon.h

index a4d9d9b30a5f9df46b4c972967c357469cb7d895..cde0125ee7a8a59c0731970be3196979b7e38f6c 100644 (file)
@@ -146,7 +146,12 @@ class MMDSBeacon : public PaxosServiceMessage {
   uint64_t mds_features;
 
  public:
-  MMDSBeacon() : PaxosServiceMessage(MSG_MDS_BEACON, 0, HEAD_VERSION, COMPAT_VERSION) { }
+  MMDSBeacon()
+    : PaxosServiceMessage(MSG_MDS_BEACON, 0, HEAD_VERSION, COMPAT_VERSION),
+    global_id(0), state(MDSMap::STATE_NULL), standby_for_rank(MDS_RANK_NONE),
+    standby_for_fscid(FS_CLUSTER_ID_NONE), standby_replay(false),
+    mds_features(0)
+  { }
   MMDSBeacon(const uuid_d &f, mds_gid_t g, string& n, epoch_t les, MDSMap::DaemonState st, version_t se, uint64_t feat) :
     PaxosServiceMessage(MSG_MDS_BEACON, les, HEAD_VERSION, COMPAT_VERSION),
     fsid(f), global_id(g), name(n), state(st), seq(se),