Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix s3.clean.uploads #4766

Merged
merged 1 commit into from
Aug 19, 2023
Merged

Fix s3.clean.uploads #4766

merged 1 commit into from
Aug 19, 2023

Conversation

SmsS4
Copy link
Contributor

@SmsS4 SmsS4 commented Aug 19, 2023

What problem are we solving?

wrong jwt error in s3.clean.uploads
security.toml:

[jwt.signing]                      
key = "aaaaaaaaaaaa"           
expires_after_seconds = 30
                                   
[jwt.filer_signing]                
key = "bbbbbbbbbbb"           
expires_after_seconds = 30
> s3.clean.uploads -timeAgo 0
purge http://192.168.20.70:8888/buckets/test/.uploads/109f4b3c50d7b0df729d299bc6f8e9ef9066971f_19a49cbefa9c47cd8ecdf0f8993d1cdb?recursive=true&ignoreRecursiveError=true
failed cleanup uploads for bucket test: purge /buckets/test/.uploads/109f4b3c50d7b0df729d299bc6f8e9ef9066971f_19a49cbefa9c47cd8ecdf0f8993d1cdb: wrong jwt> 

How are we solving the problem?

weed shell is using jwt.signing.key for s3.clean.upload instead of jwt.filer_signing.key

How is the PR tested?

$ go run ./weed/weed.go master
$ go run ./weed/weed.go filer -s3 
$ go run ./weed/weed.go volume
$ dd if=/dev/zero of=test2 bs=1024MB count=1
$ aws --endpoint http://localhost:8333 s3 cp test2  s3://test
terminate aws cli with `SIGKILL`
$ echo "ls -a /buckets/test/.uploads/" | go run ./weed/weed.go shell
109f4b3c50d7b0df729d299bc6f8e9ef9066971f_8bb5348b440a47d9ae6cd9ed76c49995
echo "s3.clean.uploads -timeAgo 0" | go run ./weed/weed.go shell
purge http://192.168.20.70:8888/buckets/test/.uploads/109f4b3c50d7b0df729d299bc6f8e9ef9066971f_8bb5348b440a47d9ae6cd9ed76c49995?recursive=true&ignoreRecursiveError=true
$ echo "ls -a /buckets/test/.uploads/" | go run ./weed/weed.go shell

Checks

  • I have added unit tests if possible.
  • I will add related wiki document changes and link to this PR after merging.

@chrislusf chrislusf merged commit 1e72579 into seaweedfs:master Aug 19, 2023
5 checks passed
kmlebedev pushed a commit to kmlebedev/seaweedfs that referenced this pull request Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants