mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
mds: handle missing/corrupt data during boot
These errors trickle up to boot_start from e.g. CInode::_fetched when something goes wrong. Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
parent
816d9e0348
commit
6cb1f6cca7
@ -1939,7 +1939,14 @@ void MDS::boot_start(BootStep step, int r)
|
||||
dout(0) << "boot_start encountered an error EAGAIN"
|
||||
<< ", respawning since we fell behind journal" << dendl;
|
||||
respawn();
|
||||
} else if (r == -EINVAL || r == -ENOENT) {
|
||||
// Invalid or absent data, indicates damaged on-disk structures
|
||||
clog->error() << "Error loading MDS rank " << whoami << ": "
|
||||
<< cpp_strerror(r);
|
||||
damaged();
|
||||
assert(r == 0); // Unreachable, damaged() calls respawn()
|
||||
} else {
|
||||
// Completely unexpected error, give up and die
|
||||
dout(0) << "boot_start encountered an error, failing" << dendl;
|
||||
suicide();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user