}
auto& info = mds_map.mds_info.at(standby_gid);
+ if (!filesystem.mds_map.compat.writeable(info.compat)) {
+ ceph_assert(filesystem.is_upgradeable());
+ filesystem.mds_map.compat.merge(info.compat);
+ }
+
if (mds_map.stopped.erase(assigned_rank)) {
// The cluster is being expanded with a stopped rank
info.state = MDSMap::STATE_STARTING;
standby_epochs.erase(standby_gid);
}
- if (!filesystem.mds_map.compat.writeable(info.compat)) {
- ceph_assert(filesystem.is_upgradeable());
- filesystem.mds_map.compat.merge(info.compat);
- }
-
// Indicate that Filesystem has been modified
mds_map.epoch = epoch;
}
void print(std::ostream& out) const;
bool is_upgradeable() const {
- return !mds_map.allows_standby_replay() && mds_map.get_num_in_mds() <= 1;
+ return (mds_map.allows_standby_replay() && mds_map.get_num_in_mds() == 0)
+ || (!mds_map.allows_standby_replay() && mds_map.get_num_in_mds() <= 1);
}
/**