Commit 7cf1f774 authored by Michael Davis's avatar Michael Davis
Browse files

[migration] Adds better error reporting when directory metadata doesn't match

parent 43174797
......@@ -270,6 +270,29 @@ bool EosImportDirs::compareMD(const eos::rpc::ContainerMdProto &dir)
dir.ctime().sec() != remote_dir.cmd().ctime().sec() ||
dir.name() != remote_dir.cmd().name() ||
(dir.path() + '/') != remote_dir.cmd().path()) {
std::cerr << dir.path() << "/: ";
if((dir.path() + '/') != remote_dir.cmd().path()) {
std::cerr << "[EOS: " << remote_dir.cmd().path() << "] ";
}
if(dir.name() != remote_dir.cmd().name()) {
std::cerr << "name [DB: " << dir.name() << " EOS: " << remote_dir.cmd().name() << "] ";
}
if(dir.id() != remote_dir.cmd().id()) {
std::cerr << "id [DB: " << dir.id() << " EOS: " << remote_dir.cmd().id() << "] ";
}
if(dir.uid() != remote_dir.cmd().uid()) {
std::cerr << "uid [DB: " << dir.uid() << " EOS: " << remote_dir.cmd().uid() << "] ";
}
if(dir.gid() != remote_dir.cmd().gid()) {
std::cerr << "gid [DB: " << dir.gid() << " EOS: " << remote_dir.cmd().gid() << "] ";
}
if(dir.mode() != remote_dir.cmd().mode()) {
std::cerr << "mode [DB: " << dir.mode() << " EOS: " << remote_dir.cmd().mode() << "] ";
}
if(dir.ctime().sec() != remote_dir.cmd().ctime().sec()) {
std::cerr << "ctime [DB: " << dir.ctime().sec() << " EOS: " << remote_dir.cmd().ctime().sec() << "] ";
}
std::cerr << std::endl;
return false;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment