]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: skip on EACCES in RGWBucketSyncSingleEntryCR 61271/head
authorSeena Fallah <seenafallah@gmail.com>
Wed, 8 Jan 2025 21:25:13 +0000 (22:25 +0100)
committerSeena Fallah <seenafallah@gmail.com>
Wed, 8 Jan 2025 21:25:13 +0000 (22:25 +0100)
As of offloading source bucket perm check to the source cluster by (a3f40b4)
the http result of 403 would be translated to EACCES by rgw_http_error_to_errno()
so we need to also consider EACCES to be skipped in RGWBucketSyncSingleEntryCR().

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
src/rgw/driver/rados/rgw_data_sync.cc

index 22e08c039f328b6a04b06d5d370ccd57bff051ac..1302f278f590d2de69222270449f8d73df096a1c 100644 (file)
@@ -4520,7 +4520,7 @@ public:
           }
           tn->set_resource_name(SSTR(bucket_str_noinstance(bs.bucket) << "/" << key));
         }
-        if (retcode == -ERR_PRECONDITION_FAILED || retcode == -EPERM) {
+        if (retcode == -ERR_PRECONDITION_FAILED || retcode == -EPERM || retcode == -EACCES) {
          pretty_print(sc->env, "Skipping object s3://{}/{} in sync from zone {}\n",
                       bs.bucket.name, key, zone_name);
           set_status("Skipping object sync: precondition failed (object contains newer change or policy doesn't allow sync)");