In certain cases, the beacon was emitted from within
handle_mds_map (via MDCache::rejoin_start and
the "No subtrees found for root MDS rank!" error
handler. This was happening before Beacon::notify_mdsmap
had been called with the new epoch, so the DAMAGED
beacon had the old epoch set, and was consequently
ignored by the MDSMonitor.
The symptom would be that MDS ranks with metadata damaged
in this particular way would flap instead of gracefully
going damaged.
Signed-off-by: John Spray <john.spray@redhat.com>
monc->sub_got("mdsmap", mdsmap->get_epoch());
+ // Update Beacon early, so that if any of the below code for handling
+ // state changes wants to send a beacon, it reflects the latest epoch.
+ beacon.notify_mdsmap(mdsmap);
+
// verify compatset
CompatSet mdsmap_compat(get_mdsmap_compat_set_all());
dout(10) << " my compat " << mdsmap_compat << dendl;
mdcache->notify_mdsmap_changed();
out:
- beacon.notify_mdsmap(mdsmap);
-
m->put();
delete oldmap;
}