]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Add more details to the LC delete and transition log 30913/head
authorOr Friedmann <ofriedma@redhat.com>
Mon, 14 Oct 2019 17:21:30 +0000 (20:21 +0300)
committerOr Friedmann <ofriedma@redhat.com>
Thu, 24 Oct 2019 15:15:58 +0000 (18:15 +0300)
rgw: Add more details to the LC delete log

Currently the delete and transition log are not clear on which object it failed to delete or transit  and what is the error code for it.
This PR adds more details to that error

Signed-off-by: Or Friedmann <ofriedma@redhat.com>
src/rgw/rgw_lc.cc

index 18cb5aa84ba8a9f279e72214e02cc48e1d1444f6..b985f18e700e1ecd40e23fc36069bc77a61cfdc8 100644 (file)
@@ -772,7 +772,9 @@ public:
       r = remove_expired_obj(oc, !oc.bucket_info.versioned());
     }
     if (r < 0) {
-      ldout(oc.cct, 0) << "ERROR: remove_expired_obj " << dendl;
+      ldout(oc.cct, 0) << "ERROR: remove_expired_obj " 
+      << oc.bucket_info.bucket << ":" << o.key 
+      << " " << cpp_strerror(r) << dendl;
       return r;
     }
     ldout(oc.cct, 2) << "DELETED:" << oc.bucket_info.bucket << ":" << o.key << dendl;
@@ -801,7 +803,9 @@ public:
     auto& o = oc.o;
     int r = remove_expired_obj(oc, true);
     if (r < 0) {
-      ldout(oc.cct, 0) << "ERROR: remove_expired_obj " << dendl;
+      ldout(oc.cct, 0) << "ERROR: remove_expired_obj (non-current expiration) " 
+      << oc.bucket_info.bucket << ":" << o.key 
+      << " " << cpp_strerror(r) << dendl;
       return r;
     }
     ldout(oc.cct, 2) << "DELETED:" << oc.bucket_info.bucket << ":" << o.key << " (non-current expiration)" << dendl;
@@ -832,7 +836,9 @@ public:
     auto& o = oc.o;
     int r = remove_expired_obj(oc, true);
     if (r < 0) {
-      ldout(oc.cct, 0) << "ERROR: remove_expired_obj " << dendl;
+      ldout(oc.cct, 0) << "ERROR: remove_expired_obj (delete marker expiration) "
+      << oc.bucket_info.bucket << ":" << o.key
+      << " " << cpp_strerror(r) << dendl;
       return r;
     }
     ldout(oc.cct, 2) << "DELETED:" << oc.bucket_info.bucket << ":" << o.key << " (delete marker expiration)" << dendl;
@@ -902,7 +908,10 @@ public:
     int r = oc.store->getRados()->transition_obj(oc.rctx, oc.bucket_info, oc.obj,
                                      target_placement, o.meta.mtime, o.versioned_epoch, oc.dpp, null_yield);
     if (r < 0) {
-      ldpp_dout(oc.dpp, 0) << "ERROR: failed to transition obj (r=" << r << ")" << dendl;
+      ldpp_dout(oc.dpp, 0) << "ERROR: failed to transition obj " 
+      << oc.bucket_info.bucket << ":" << o.key 
+      << " -> " << transition.storage_class 
+      << " " << cpp_strerror(r) << dendl;
       return r;
     }
     ldpp_dout(oc.dpp, 2) << "TRANSITIONED:" << oc.bucket_info.bucket << ":" << o.key << " -> " << transition.storage_class << dendl;
@@ -1009,7 +1018,9 @@ int LCOpRule::process(rgw_bucket_dir_entry& o, const DoutPrefixProvider *dpp)
 
     int r = (*selected)->process(ctx);
     if (r < 0) {
-      ldpp_dout(dpp, 0) << "ERROR: remove_expired_obj " << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: remove_expired_obj " 
+      << env.bucket_info.bucket << ":" << o.key
+      << " " << cpp_strerror(r) << dendl;
       return r;
     }
     ldpp_dout(dpp, 20) << "processed:" << env.bucket_info.bucket << ":" << o.key << dendl;