Skip to content

Commit

Permalink
messages/MOSDMap: mark as enlighten OSDMap encoder
Browse files Browse the repository at this point in the history
Back in 7009440 we require that anyone
encoding an OSDMap pass in a special feature bit indicating that they are
'enlightened' and understand the rules around encoding OSDMaps (basically,
only mons get to do it).  We forgot to update MOSDMap, which may have to
reencode an OSDMap without some features to talk to a really old client.
We haven't noticed until now because the old set of features we had to do
this for are really old.

We are about to introduce new features (for addr2 encoding) that change
that, and this fix is needed to prevent an assert when doing a reencode.

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Aug 24, 2016
1 parent 25415bf commit 3e4ee6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/messages/MOSDMap.h
Expand Up @@ -109,7 +109,7 @@ class MOSDMap : public Message {
OSDMap m;
m.decode(inc.fullmap);
inc.fullmap.clear();
m.encode(inc.fullmap, features);
m.encode(inc.fullmap, features | CEPH_FEATURE_RESERVED);
}
inc.encode(p->second, features);
}
Expand All @@ -119,7 +119,7 @@ class MOSDMap : public Message {
OSDMap m;
m.decode(p->second);
p->second.clear();
m.encode(p->second, features);
m.encode(p->second, features | CEPH_FEATURE_RESERVED);
}
}
::encode(incremental_maps, payload);
Expand Down

0 comments on commit 3e4ee6a

Please sign in to comment.