]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: removed spurious error message from mirror pool commands 14935/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 3 May 2017 14:49:09 +0000 (10:49 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 3 May 2017 14:49:09 +0000 (10:49 -0400)
If the pool was empty, the rbd CLI would report the error
"rbd: failed to list images within pool".

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd/action/MirrorPool.cc

index d3bc63b277cda70d7c9178f26c87bd9ea62817b6..5e51ca8e1ac38b5d6164940ba3fbc2911e09e3c2 100644 (file)
@@ -466,7 +466,7 @@ public:
     // mirror image operations
     librbd::RBD rbd;
     int r = rbd.list(m_io_ctx, m_image_names);
-    if (r < 0) {
+    if (r < 0 && r != -ENOENT) {
       std::cerr << "rbd: failed to list images within pool" << std::endl;
       return r;
     }