when trying to mksnap on a pool in the selfmanaged snaps mode.
Previously the error message in this case was:
error creating pool XYZ snapshot ABC: (22) Invalid argument
which was highly uninformative.
Signed-off-by: Mykola Golub <mgolub@suse.com>
return 1;
}
+ if (rados.get_pool_is_selfmanaged_snaps_mode(pool_name)) {
+ cerr << "can't create snapshot: pool " << pool_name
+ << " is in selfmanaged snaps mode" << std::endl;
+ return 1;
+ }
+
ret = io_ctx.snap_create(nargs[1]);
if (ret < 0) {
cerr << "error creating pool " << pool_name << " snapshot " << nargs[1]