diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-05-15 11:24:36 +0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-01 10:27:34 -0700 |
commit | ca61402855966210ba1598239eaf454eaad0f5f2 (patch) | |
tree | c95306e59cbcc3579ff7c969ced969d06144657c | |
parent | e11f258831e14dc3755e09c0fd4f9bfdf79022a7 (diff) | |
download | ceph-ca61402855966210ba1598239eaf454eaad0f5f2.tar.gz |
mds: warn on unconnected snap realms
When there are more than one active MDS, restarting MDS triggers
assertion "reconnected_snaprealms.empty()" quite often. If there
is no snapshot in the FS, the items left in reconnected_snaprealms
should be other MDS' mdsdir. I think it's harmless.
If there are snapshots in the FS, the assertion probably can catch
real bugs. But at present, snapshot feature is broken, fixing it is
non-trivial. So replace the assertion with a warning.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
(cherry picked from commit 26effc0e583b0a3dade6ec81ef26dec1c94ac8b2)
-rw-r--r-- | src/mds/MDCache.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 9df91b47961..c57acdb400a 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5216,9 +5216,22 @@ void MDCache::open_snap_parents() gather.set_finisher(new C_MDC_OpenSnapParents(this)); gather.activate(); } else { + if (!reconnected_snaprealms.empty()) { + stringstream warn_str; + for (map<inodeno_t,map<client_t,snapid_t> >::iterator p = reconnected_snaprealms.begin(); + p != reconnected_snaprealms.end(); + ++p) { + warn_str << " unconnected snaprealm " << p->first << "\n"; + for (map<client_t,snapid_t>::iterator q = p->second.begin(); + q != p->second.end(); + ++q) + warn_str << " client." << q->first << " snapid " << q->second << "\n"; + } + mds->clog.warn() << "open_snap_parents has:" << "\n"; + mds->clog.warn(warn_str); + } assert(rejoin_waiters.empty()); assert(missing_snap_parents.empty()); - assert(reconnected_snaprealms.empty()); dout(10) << "open_snap_parents - all open" << dendl; do_delayed_cap_imports(); |