Signed-off-by: Sage Weil <sage@redhat.com>
ret = rados.pool_delete(nargs[1]);
if (ret >= 0) {
cout << "successfully deleted pool " << nargs[1] << std::endl;
- } else { //error
+ } else {
cerr << "pool " << nargs[1] << " could not be removed" << std::endl;
- cerr << "Check your monitor configuration - `mon allow pool delete` is set to false by default,"
- << " change it to true to allow deletion of pools" << std::endl;
+ if (ret == -EPERM) {
+ cerr << "Check your monitor configuration - `mon allow pool delete` is set to false by default,"
+ << " change it to true to allow deletion of pools" << std::endl;
+ }
}
}
else if (strcmp(nargs[0], "purge") == 0) {