From 964fcd5f59c33a98d7ad169b12bcca482203968a Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 14 Nov 2024 15:27:14 +0000 Subject: [PATCH] s3: fix multitenant multipart uploads with CEPH CEPH uses a special bucket form `tenant:bucket` for multitentant access using S3 as documented here: https://docs.ceph.com/en/reef/radosgw/multitenancy/#s3 However when doing multipart uploads, in the reply from `CreateMultipart` the `tenant:` was missing from the `Bucket` response rclone was using to build the `UploadPart` request. This caused a 404 failure return. This may be a CEPH bug, but it is easy to work around. This changes the code to use the `Bucket` and `Key` that we used in `CreateMultipart` in `UploadPart` rather than the one returned from `CreateMultipart` which fixes the problem. See: https://forum.rclone.org/t/rclone-zcat-does-not-work-with-a-multitenant-ceph-backend/48618 --- backend/s3/s3.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 8d13f9be9..e27e3a60a 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -6070,8 +6070,8 @@ func (f *Fs) OpenChunkWriter(ctx context.Context, remote string, src fs.ObjectIn chunkSize: int64(chunkSize), size: size, f: f, - bucket: mOut.Bucket, - key: mOut.Key, + bucket: ui.req.Bucket, + key: ui.req.Key, uploadID: mOut.UploadId, multiPartUploadInput: &mReq, completedParts: make([]types.CompletedPart, 0),