From: Sage Weil Date: Mon, 29 Aug 2016 19:15:06 +0000 (-0400) Subject: messages/MOSDMap: mark as enlighten OSDMap encoder X-Git-Tag: v11.0.1~340^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9c92d958d7225676c18269ba0261ddfae72193e9;p=ceph.git messages/MOSDMap: mark as enlighten OSDMap encoder Back in 70094407c184baaf963577cc0d98edde12e8e9da 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 --- diff --git a/src/messages/MOSDMap.h b/src/messages/MOSDMap.h index 06e79de4779..10e7400075d 100644 --- a/src/messages/MOSDMap.h +++ b/src/messages/MOSDMap.h @@ -109,9 +109,9 @@ public: 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); + inc.encode(p->second, features | CEPH_FEATURE_RESERVED); } for (map::iterator p = maps.begin(); p != maps.end(); @@ -119,7 +119,7 @@ public: 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);