From 6d42133cf3884eb9b3ec0f5d3321aa6ee6e8ead8 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 3 May 2017 10:49:09 -0400 Subject: [PATCH] rbd: removed spurious error message from mirror pool commands If the pool was empty, the rbd CLI would report the error "rbd: failed to list images within pool". Signed-off-by: Jason Dillaman --- src/tools/rbd/action/MirrorPool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rbd/action/MirrorPool.cc b/src/tools/rbd/action/MirrorPool.cc index d3bc63b277c..5e51ca8e1ac 100644 --- a/src/tools/rbd/action/MirrorPool.cc +++ b/src/tools/rbd/action/MirrorPool.cc @@ -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; } -- 2.39.5