]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: dont log EBUSY errors in 'sync error list' 19908/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 18 Dec 2017 16:42:21 +0000 (11:42 -0500)
committerPrashant D <pdhange@redhat.com>
Thu, 11 Jan 2018 00:41:53 +0000 (19:41 -0500)
these temporary errors get retried automatically, so no admin
intervention is required. logging them only serves to waste space in
omap and obscure the more serious sync errors

Fixes: http://tracker.ceph.com/issues/22473
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit ca4510bc76ad7beed1128539aa9e424d29dd8585)

Conflicts:
src/rgw/rgw_data_sync.cc: Resolved conflicts for sync_status
  check and logging

src/rgw/rgw_data_sync.cc

index 1853eb337589a96644cc92bc628f0b72f90fcaa2..17a91e7e7864ddb6178fb54143dbe9092eb71d9d 100644 (file)
@@ -940,10 +940,13 @@ public:
       }
 
       if (sync_status < 0) {
-        yield call(sync_env->error_logger->log_error_cr(sync_env->conn->get_remote_id(), "data", raw_key,
-                                                        -sync_status, string("failed to sync bucket instance: ") + cpp_strerror(-sync_status)));
-        if (retcode < 0) {
-          ldout(sync_env->store->ctx(), 0) << "ERROR: failed to log sync failure: retcode=" << retcode << dendl;
+        // write actual sync failures for 'radosgw-admin sync error list'
+        if (sync_status != -EBUSY && sync_status != -EAGAIN) {
+          yield call(sync_env->error_logger->log_error_cr(sync_env->conn->get_remote_id(), "data", raw_key,
+                                                          -sync_status, string("failed to sync bucket instance: ") + cpp_strerror(-sync_status)));
+          if (retcode < 0) {
+            ldout(sync_env->store->ctx(), 0) << "ERROR: failed to log sync failure: retcode=" << retcode << dendl;
+          }
         }
         if (error_repo && !error_repo->append(raw_key)) {
           ldout(sync_env->store->ctx(), 0) << "ERROR: failed to log sync failure in error repo: retcode=" << retcode << dendl;