]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rbd: don't hide partially deleted images in long image list
authorJason Dillaman <dillaman@redhat.com>
Wed, 20 Feb 2019 14:14:01 +0000 (09:14 -0500)
committerJason Dillaman <dillaman@redhat.com>
Wed, 20 Feb 2019 21:47:07 +0000 (16:47 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd/action/List.cc

index 9028a5706650596fae3fa08faf92369d9890b06d..e60254183ad533e6073ac5353a17a3568851ebc1 100644 (file)
@@ -255,10 +255,9 @@ int do_list(const std::string &pool_name, const std::string& namespace_name,
          r = comp->completion->get_return_value();
          comp->completion->release();
          if (r < 0) {
-           if (r != -ENOENT) {
-             std::cerr << "rbd: error opening " << i->name << ": "
-                        << cpp_strerror(r) << std::endl;
-           }
+           std::cerr << "rbd: error opening " << comp->name << ": "
+                      << cpp_strerror(r) << std::endl;
+
            // in any event, continue to next image
            comp->state = STATE_IDLE;
            continue;
@@ -324,7 +323,7 @@ int execute(const po::variables_map &vm,
               g_conf().get_val<uint64_t>("rbd_concurrent_management_ops"),
               formatter.get());
   if (r < 0) {
-    std::cerr << "rbd: listing images failed : " << cpp_strerror(r)
+    std::cerr << "rbd: listing images failed: " << cpp_strerror(r)
               << std::endl;
     return r;
   }