tools/ceph-objectstore-tool: do not fail on lack of OI_ATTR for an

object.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
This commit is contained in:
Igor Fedotov 2018-02-09 15:00:07 +03:00
parent 7f768dbf62
commit 935a1bdb34

View File

@ -109,17 +109,16 @@ int _action_on_all_objects_in_pg(ObjectStore *store, coll_t coll, action_on_obje
if (r < 0) {
cerr << "Error getting attr on : " << make_pair(coll, *obj) << ", "
<< cpp_strerror(r) << std::endl;
continue;
}
bufferlist::iterator bp = attr.begin();
try {
decode(oi, bp);
} catch (...) {
r = -EINVAL;
cerr << "Error getting attr on : " << make_pair(coll, *obj) << ", "
<< cpp_strerror(r) << std::endl;
continue;
}
} else {
bufferlist::iterator bp = attr.begin();
try {
decode(oi, bp);
} catch (...) {
r = -EINVAL;
cerr << "Error decoding attr on : " << make_pair(coll, *obj) << ", "
<< cpp_strerror(r) << std::endl;
}
}
}
r = action.call(store, coll, *obj, oi);
if (r < 0)