mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
rbd: only open the destination pool for import
Otherwise importing into another pool when the default pool, rbd, doesn't exist results in an error trying to open the rbd pool. Reported-by: Sébastien Han <han.sebastien@gmail.com> Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
46883a5a0f
commit
4f3642c5f4
@ -1343,7 +1343,7 @@ int main(int argc, const char **argv)
|
||||
}
|
||||
|
||||
int r;
|
||||
if (talk_to_cluster) {
|
||||
if (talk_to_cluster && opt_cmd != OPT_IMPORT) {
|
||||
r = rados.ioctx_create(poolname, io_ctx);
|
||||
if (r < 0) {
|
||||
cerr << "error opening pool " << poolname << ": " << cpp_strerror(-r) << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user