From a200637fec822140a6951814a3e4a0c3fe11d247 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Thu, 19 Apr 2018 10:44:11 +0800 Subject: [PATCH] mon: respect standby_for_fscid when choosing standby replay mds Signed-off-by: "Yan, Zheng" (cherry picked from commit e3a38e9e89577f54c8a52fa32b3e0d14fe8e7088) --- src/mon/MDSMonitor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 6db751d50b6b..21d939331f94 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -2226,6 +2226,10 @@ bool MDSMonitor::maybe_promote_standby(std::shared_ptr &fs) // check everyone for (const auto &p : pending.filesystems) { + if (info.standby_for_fscid != FS_CLUSTER_ID_NONE && + info.standby_for_fscid != p.first) + continue; + bool assigned = false; const auto &fs = p.second; const MDSMap &mds_map = fs->mds_map; -- 2.47.3