rbd: propagate Trash::purge() result

Exit with respective status like other commands do.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Ilya Dryomov 2021-05-26 14:21:22 +02:00
parent 935d3e079d
commit d0dd4b75d3

View File

@ -400,7 +400,7 @@ void get_purge_arguments(po::options_description *positional,
"value range: 0.0-1.0");
}
int execute_purge (const po::variables_map &vm,
int execute_purge(const po::variables_map &vm,
const std::vector<std::string> &ceph_global_init_args) {
std::string pool_name;
std::string namespace_name;
@ -446,10 +446,10 @@ int execute_purge (const po::variables_map &vm,
r = rbd.trash_purge_with_progress(io_ctx, expire_ts, threshold, pc);
if (r < 0) {
pc.fail();
} else {
pc.finish();
return r;
}
pc.finish();
return 0;
}