diff options
author | Patrick Donnelly <pdonnell@redhat.com> | 2019-02-22 01:34:07 +0100 |
---|---|---|
committer | Patrick Donnelly <pdonnell@redhat.com> | 2019-02-28 06:38:25 +0100 |
commit | d4638836ba2335f5b8eeb4a7624992caf7bb6901 (patch) | |
tree | fc2f60193dc2125e4fa9d88369a06432369ab174 /src/mds/MDSMap.h | |
parent | messages/MMDSBeacon: use inline init (diff) | |
download | ceph-d4638836ba2335f5b8eeb4a7624992caf7bb6901.tar.xz ceph-d4638836ba2335f5b8eeb4a7624992caf7bb6901.zip |
fs: obsolete standby_for config options
The operator can no longer configure which rank/fscid/name an MDS wants to
follow or standby for. This was an unfortunately confusing set of config
options as ultimately the MDSMonitor (by default) would set a standby to follow
any fscid/rank if no standby is available that explicitly follows the failed
rank. It is suggested that operators instead use the `standby_count_wanted`
setting on each fs to ensure that sufficient standbys are available.
The temporary effect of this commit is that the MDSMonitor no longer assigns
any standby to standby-replay, to be fixed in the following commits.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Diffstat (limited to 'src/mds/MDSMap.h')
-rw-r--r-- | src/mds/MDSMap.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/mds/MDSMap.h b/src/mds/MDSMap.h index b1527f32f0c..a181a611dc4 100644 --- a/src/mds/MDSMap.h +++ b/src/mds/MDSMap.h @@ -108,10 +108,6 @@ public: version_t state_seq = 0; entity_addrvec_t addrs; utime_t laggy_since; - mds_rank_t standby_for_rank = MDS_RANK_NONE; - std::string standby_for_name; - fs_cluster_id_t standby_for_fscid = FS_CLUSTER_ID_NONE; - bool standby_replay = false; std::set<mds_rank_t> export_targets; uint64_t mds_features = 0; @@ -536,13 +532,22 @@ public: return is_clientreplay(m) || is_active(m) || is_stopping(m); } - bool is_followable(mds_rank_t m) const { - return (is_resolve(m) || - is_replay(m) || - is_rejoin(m) || - is_clientreplay(m) || - is_active(m) || - is_stopping(m)); + bool is_followable(mds_rank_t r) const { + bool has_followable_rank = false; + for (const auto& p : mds_info) { + auto& info = p.second; + if (info.rank == r) { + if (info.state == STATE_ACTIVE) { + has_followable_rank = true; + } else { + return false; + } + } + if (p.second.state == STATE_STANDBY_REPLAY) { + return false; + } + } + return has_followable_rank; } bool is_laggy_gid(mds_gid_t gid) const { |