return get_available_standby(*fs);
}
-void FSMap::sanity() const
+void FSMap::sanity(bool pending) const
{
+ /* Only do some sanity checks on **new** FSMaps. Older versions may not be
+ * compliant.
+ */
+
if (legacy_client_fscid != FS_CLUSTER_ID_NONE) {
ceph_assert(filesystems.count(legacy_client_fscid) == 1);
}
ceph_assert(fs->mds_map.failed.count(info.rank) == 0);
ceph_assert(fs->mds_map.damaged.count(info.rank) == 0);
} else {
- ceph_assert(fs->mds_map.allows_standby_replay());
+ ceph_assert(!pending || fs->mds_map.allows_standby_replay());
}
ceph_assert(info.compat.writeable(fs->mds_map.compat));
}
* Assert that the FSMap, Filesystem, MDSMap, mds_info_t relations are
* all self-consistent.
*/
- void sanity() const;
+ void sanity(bool pending=false) const;
void encode(ceph::buffer::list& bl, uint64_t features) const;
void decode(ceph::buffer::list::const_iterator& p);
// print map iff 'debug mon = 30' or higher
print_map<30>(pending);
if (!g_conf()->mon_mds_skip_sanity) {
- pending.sanity();
+ pending.sanity(true);
}
// Set 'modified' on maps modified this epoch