OPTION(mds_verify_backtrace, OPT_U32, 1)
OPTION(mds_action_on_write_error, OPT_U32, 1) // 0: ignore; 1: force readonly; 2: crash
+OPTION(mds_mon_shutdown_timeout, OPT_DOUBLE, 5)
// If true, compact leveldb store on mount
OPTION(osd_compact_leveldb_on_mount, OPT_BOOL, false)
mds_lock.Unlock();
}
+void MDS::damaged()
+{
+ set_want_state(MDSMap::STATE_DAMAGED);
+ beacon.notify_health(this); // Include latest status in our swan song
+ beacon.send_and_wait(g_conf->mds_mon_shutdown_timeout);
+
+ // It's okay if we timed out and the mon didn't get our beacon, because
+ // another daemon (or ourselves after respawn) will eventually take the
+ // rank and report DAMAGED again when it hits same problem we did.
+
+ respawn(); // Respawn into standby in case mon has other work for us
+}
+
void MDS::suicide()
{
assert(mds_lock.is_locked());
void handle_mds_recovery(mds_rank_t who);
void handle_mds_failure(mds_rank_t who);
+ /**
+ * Report state DAMAGED to the mon, and then pass on to respawn(). Call
+ * this when an unrecoverable error is encountered while attempting
+ * to load an MDS rank's data structures. This is *not* for use with
+ * errors affecting normal dirfrag/inode objects -- they should be handled
+ * through cleaner scrub/repair mechanisms.
+ */
+ void damaged();
void suicide();
void respawn();
void handle_write_error(int err);