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
This commit is contained in:
Nick Craig-Wood 2024-11-14 15:27:14 +00:00
parent c6281a1217
commit 964fcd5f59

View File

@ -6070,8 +6070,8 @@ func (f *Fs) OpenChunkWriter(ctx context.Context, remote string, src fs.ObjectIn
chunkSize: int64(chunkSize), chunkSize: int64(chunkSize),
size: size, size: size,
f: f, f: f,
bucket: mOut.Bucket, bucket: ui.req.Bucket,
key: mOut.Key, key: ui.req.Key,
uploadID: mOut.UploadId, uploadID: mOut.UploadId,
multiPartUploadInput: &mReq, multiPartUploadInput: &mReq,
completedParts: make([]types.CompletedPart, 0), completedParts: make([]types.CompletedPart, 0),