Craiggles
05/05/2022, 3:46 AMandrew
05/05/2022, 4:08 AMCraiggles
05/05/2022, 4:26 AMVitali
05/05/2022, 4:46 AMandrew
05/05/2022, 6:49 AMalbert
05/05/2022, 7:51 AMDani Foldi
05/05/2022, 7:59 AMitsmatteomanf
05/05/2022, 9:01 AMitsmatteomanf
05/05/2022, 9:02 AMitsmatteomanf
05/05/2022, 9:03 AMncw
05/05/2022, 10:05 AMSid | R2
05/05/2022, 10:23 AMncw
05/05/2022, 10:46 AMNotImplemented: Copying from a different account/bucket/object not implemented
- when trying to copy a file to itself to update the metadata: InvalidArgument: Invalid Argument: copy source bucket name
. This is easy to replicate with rclone touch -vv --dump bodies --low-level-retries 1 --retries 1 r2:rclone/file.txt
- Range requests seem incompatible with s3: Invalid Argument: range must be in format bytes=start-end
. This is easy to replicate with rclone cat -vv --tail 5 --low-level-retries 1 --retries 1 r2:rclone/file.txt --dump bodies
which shows rclone is sending Range: bytes=21-
which is RFC compliant and aws compatible.
- streaming uploads are failing with InternalError: We encountered an internal error. Please try again
. I haven't managed to reproduce this outside the test suite yet.
The integration test suite didn't finish so there is probably more to come.
Would you like me to investigate more of those? Or post the transcript somewhere?
If you want to run rclone's test suite yourself,
- Checkout the rclone source, branch fix-5422-s3-putobject
from github.com/rclone/rclone
- cd rclone/rclone/backend/s3
- create a remote for testing - I called mine r2
- see below
- go test -list-retries 1 -v -remote r2: -timeout 30m
Add -verbose -dump-bodies
if you want to see the HTTP transactions
The rclone config needs to look something like
[r2]
type = s3
provider = Other
access_key_id = YOURACCESSKEY
secret_access_key = YOURSECRETACCESSKEY
endpoint = https://YOURCUSTOMERID.r2.cloudflarestorage.com
region = auto
Vitali
05/05/2022, 10:56 AMVitali
05/05/2022, 11:03 AMVitali
05/05/2022, 11:11 AMitsmatteomanf
05/05/2022, 11:13 AMitsmatteomanf
05/05/2022, 11:13 AMVitali
05/05/2022, 11:14 AMitsmatteomanf
05/05/2022, 11:15 AMVitali
05/05/2022, 11:16 AMVitali
05/05/2022, 11:17 AMitsmatteomanf
05/05/2022, 11:18 AMVitali
05/05/2022, 11:18 AMitsmatteomanf
05/05/2022, 11:19 AMVitali
05/05/2022, 11:19 AMitsmatteomanf
05/05/2022, 11:20 AMVitali
05/05/2022, 11:20 AMncw
05/05/2022, 11:21 AM2022/05/05 12:13:03 DEBUG : PUT /rclone-test-galumiw1yewasey5xaxumey1/hello%3F%20sausage/%C3%AA%C3%A9/Hello%2C%20%E4%B8%96%E7%95%8C/%20%22%20%27%20%40%20%3C%20%3E%20%26%20%3F%20%2B%20%E2%89%
A0/z.txt-copy HTTP/1.1
Host: 14aad7c9ed489151b51557e321b246cf.r2.cloudflarestorage.com
User-Agent: rclone/v1.59.0-DEV
Content-Length: 0
Authorization: XXXX
X-Amz-Acl: private
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Copy-Source: rclone-test-galumiw1yewasey5xaxumey1/hello%3F%20sausage/%C3%AA%C3%A9/Hello,%20%E4%B8%96%E7%95%8C/%20%22%20%27%20@%20%3C%20%3E%20&%20%3F%20%2B%20%E2%89%A0/z.txt
X-Amz-Date: 20220505T111303Z
X-Amz-Metadata-Directive: COPY
Accept-Encoding: gzip
Response
2022/05/05 12:13:04 DEBUG : HTTP RESPONSE (req 0xc000538900)
2022/05/05 12:13:04 DEBUG : HTTP/2.0 501 Not Implemented
Content-Length: 123
Cf-Ray: 70690b6f0ec77714-LHR
Content-Type: text/plain;charset=UTF-8
Date: Thu, 05 May 2022 11:13:03 GMT
Expect-Ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
Vary: Accept-Encoding
<Error><Code>NotImplemented</Code><Message>Copying from a different account/bucket/object not implemented</Message></Error>
ncw
05/05/2022, 11:22 AM2022/05/05 12:16:35 DEBUG : PUT /rclone/file.txt HTTP/1.1
Host: 14aad7c9ed489151b51557e321b246cf.r2.cloudflarestorage.com
User-Agent: rclone/v1.59.0-beta.6116.781bff280.fix-5422-s3-putobject
Content-Length: 0
Authorization: XXXX
Content-Type: text/plain; charset=utf-8
X-Amz-Acl: private
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Copy-Source: rclone/file.txt
X-Amz-Date: 20220505T111635Z
X-Amz-Meta-Mtime: 1651749394.777997661
X-Amz-Metadata-Directive: REPLACE
Accept-Encoding: gzip
and here is the response
2022/05/05 12:16:35 DEBUG : HTTP RESPONSE (req 0xc000672300)
2022/05/05 12:16:35 DEBUG : HTTP/2.0 400 Bad Request
Content-Length: 103
Cf-Ray: 70691098ae2e8898-LHR
Content-Type: text/plain;charset=UTF-8
Date: Thu, 05 May 2022 11:16:35 GMT
Expect-Ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
Vary: Accept-Encoding
<Error><Code>InvalidArgument</Code><Message>Invalid Argument: copy source bucket name</Message></Error>
> Yeah, unfortunately we don't currently parse the implicit begin/end range args right now.
I can work around this in rclone if necessary - it isn't a big deal.
> What are "streaming uploads"? Just a regular PutObject? Multipart? GCS has a concept of actual streaming uploads but that can't be what you mean here because it's not implemented by AWS.
Streaming uploads are multipart uploads where you don't know the size of the file in advance. All the ones I tried worked manually worked fine though.