To handle case where MDSs restart after experiencing
a barrier-inducing operation: rather than persisting
OSD barrier somewhere, just have the MDSs always barrier
on latest OSD epoch at startup.
Effect is that after restart, MDS cap issues will
be delayed in (compliant) clients until the client
sees the latest OSD map.
Signed-off-by: John Spray <john.spray@redhat.com>
}
}
+ if (is_active()) {
+ // Before going active, set OSD epoch barrier to latest (so that
+ // we don't risk handing out caps to clients with old OSD maps that
+ // might not include barriers from the previous incarnation of this MDS)
+ const OSDMap *osdmap = objecter->get_osdmap_read();
+ const epoch_t osd_epoch = osdmap->get_epoch();
+ objecter->put_osdmap_read();
+ set_osd_epoch_barrier(osd_epoch);
+ }
+
out:
beacon.notify_mdsmap(mdsmap);