Commit dae572d
rgw: add rate limit for LIST & DELETE ops
Add rate limiting specific to LIST ops,
similar to the current rate-limiting
(https://docs.ceph.com/en/latest/radosgw/admin/#rate-limit-management)
Example usage:
```
./bin/radosgw-admin ratelimit set --ratelimit-scope=user --uid=<UID> --max_list_ops=2
./bin/radosgw-admin ratelimit set --ratelimit-scope=user --uid=<UID> --max_delete_ops=2
./bin/radosgw-admin ratelimit enable --ratelimit-scope=user --uid=<UID>
./bin/radosgw-admin ratelimit get --ratelimit-scope=user --uid=<UID>
{
"user_ratelimit": {
"max_read_ops": 0,
"max_write_ops": 0,
"max_list_ops": 2,
"max_delete_ops": 2,
"max_read_bytes": 0,
"max_write_bytes": 0,
"enabled": true
}
}
pkill -9 radosgw
./bin/radosgw -c ./ceph.conf ...
aws --endpoint-url 'http://0:8000' s3 mb s3://bkt
aws --endpoint-url 'http://0:8000' s3 cp ./ceph.conf s3://bkt
aws --endpoint-url http://0:8000 s3api list-objects-v2 --bucket bkt --prefix 'ceph.conf' --delimiter '/'
{
"Contents": [
{
"Key": "ceph.conf",
"LastModified": "2025-07-30T13:59:38+00:00",
"ETag": "\"13d11d431ae290134562c019d9e40c0e\"",
"Size": 32346,
"StorageClass": "STANDARD"
}
],
"RequestCharged": null
}
aws --endpoint-url http://0:8000 s3api list-objects-v2 --bucket bkt --prefix 'ceph.conf' --delimiter '/'
{
"Contents": [
{
"Key": "ceph.conf",
"LastModified": "2025-07-30T13:59:38+00:00",
"ETag": "\"13d11d431ae290134562c019d9e40c0e\"",
"Size": 32346,
"StorageClass": "STANDARD"
}
],
"RequestCharged": null
}
aws --endpoint-url http://0:8000 s3api list-objects-v2 --bucket bkt --prefix 'ceph.conf' --delimiter '/'
argument of type 'NoneType' is not iterable
tail -F ./out/radosgw.8000.log | grep beast
...
beast: 0x7fffbbe09780: [30/Jul/2025:15:44:50.359 +0000] " GET /bkt?list-type=2&delimiter=%2F&prefix=ceph.conf&encoding-type=url HTTP/1.1" 200 535 - "aws-cli/2.15.31 Python/3.9.21 Linux/5.14.0-570.28.1.el9_6.x86_64 source/x86_64.rhel.9 prompt/off command/s3api.list-objects-v2" - latency=0.000999995s
beast: 0x7fffbbe09780: [30/Jul/2025:15:44:53.904 +0000] " GET /bkt?list-type=2&delimiter=%2F&prefix=ceph.conf&encoding-type=url HTTP/1.1" 200 535 - "aws-cli/2.15.31 Python/3.9.21 Linux/5.14.0-570.28.1.el9_6.x86_64 source/x86_64.rhel.9 prompt/off command/s3api.list-objects-v2" - latency=0.000999995s
vvv
beast: 0x7fffbbe09780: [30/Jul/2025:15:44:58.192 +0000] " GET /bkt?list-type=2&delimiter=%2F&prefix=ceph.conf&encoding-type=url HTTP/1.1" 503 228 - "aws-cli/2.15.31 Python/3.9.21 Linux/5.14.0-570.28.1.el9_6.x86_64 source/x86_64.rhel.9 prompt/off command/s3api.list-objects-v2" - latency=0.000000000s
beast: 0x7fffbbe09780: [30/Jul/2025:15:44:58.798 +0000] " GET /bkt?list-type=2&delimiter=%2F&prefix=ceph.conf&encoding-type=url HTTP/1.1" 503 228 - "aws-cli/2.15.31 Python/3.9.21 Linux/5.14.0-570.28.1.el9_6.x86_64 source/x86_64.rhel.9 prompt/off command/s3api.list-objects-v2" - latency=0.000999994s
beast: 0x7fffbbe09780: [30/Jul/2025:15:44:59.807 +0000] " GET /bkt?list-type=2&delimiter=%2F&prefix=ceph.conf&encoding-type=url HTTP/1.1" 503 228 - "aws-cli/2.15.31 Python/3.9.21 Linux/5.14.0-570.28.1.el9_6.x86_64 source/x86_64.rhel.9 prompt/off command/s3api.list-objects-v2" - latency=0.000000000s
s3cmd put ./ceph.conf s3://bkt/1
s3cmd put ./ceph.conf s3://bkt/2
s3cmd put ./ceph.conf s3://bkt/3
s3cmd rm s3://bkt/1
s3cmd rm s3://bkt/2
s3cmd rm s3://bkt/3
delete: 's3://bkt/1'
delete: 's3://bkt/2'
WARNING: Retrying failed request: /3 (503 (SlowDown))
WARNING: Waiting 3 sec...
WARNING: Retrying failed request: /3 (503 (SlowDown))
^^^
```
Fixes: https://tracker.ceph.com/issues/72894
Signed-off-by: Mark Kogan <[email protected]>
Update PendingReleaseNotes
Co-authored-by: Yuval Lifshitz <[email protected]>
Signed-off-by: Mark Kogan <[email protected]>
Update PendingReleaseNotes
Co-authored-by: Yuval Lifshitz <[email protected]>
Signed-off-by: Mark Kogan <[email protected]>1 parent 6014f3a commit dae572d
File tree
15 files changed
+1100
-163
lines changed- doc/radosgw
- qa/tasks
- src
- common/options
- rgw
- radosgw-admin
- test
- cli/radosgw-admin
- rgw
15 files changed
+1100
-163
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
586 | 593 | | |
587 | 594 | | |
588 | 595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
625 | | - | |
626 | | - | |
627 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
628 | 640 | | |
629 | 641 | | |
630 | 642 | | |
| |||
636 | 648 | | |
637 | 649 | | |
638 | 650 | | |
639 | | - | |
640 | | - | |
| 651 | + | |
| 652 | + | |
641 | 653 | | |
642 | 654 | | |
643 | 655 | | |
| |||
654 | 666 | | |
655 | 667 | | |
656 | 668 | | |
657 | | - | |
658 | | - | |
| 669 | + | |
| 670 | + | |
659 | 671 | | |
660 | | - | |
| 672 | + | |
661 | 673 | | |
662 | 674 | | |
663 | 675 | | |
| |||
668 | 680 | | |
669 | 681 | | |
670 | 682 | | |
671 | | - | |
| 683 | + | |
672 | 684 | | |
673 | 685 | | |
674 | | - | |
| 686 | + | |
675 | 687 | | |
676 | 688 | | |
677 | | - | |
| 689 | + | |
678 | 690 | | |
679 | 691 | | |
680 | 692 | | |
681 | | - | |
| 693 | + | |
682 | 694 | | |
683 | | - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
684 | 704 | | |
685 | 705 | | |
686 | 706 | | |
| |||
699 | 719 | | |
700 | 720 | | |
701 | 721 | | |
702 | | - | |
| 722 | + | |
| 723 | + | |
703 | 724 | | |
704 | 725 | | |
705 | 726 | | |
| |||
764 | 785 | | |
765 | 786 | | |
766 | 787 | | |
767 | | - | |
| 788 | + | |
| 789 | + | |
768 | 790 | | |
769 | 791 | | |
770 | 792 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2072 | 2072 | | |
2073 | 2073 | | |
2074 | 2074 | | |
2075 | | - | |
2076 | | - | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
2077 | 2078 | | |
2078 | 2079 | | |
2079 | 2080 | | |
| |||
2087 | 2088 | | |
2088 | 2089 | | |
2089 | 2090 | | |
2090 | | - | |
| 2091 | + | |
2091 | 2092 | | |
2092 | 2093 | | |
2093 | | - | |
| 2094 | + | |
2094 | 2095 | | |
2095 | 2096 | | |
2096 | | - | |
| 2097 | + | |
2097 | 2098 | | |
2098 | 2099 | | |
2099 | | - | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
2100 | 2107 | | |
2101 | 2108 | | |
2102 | 2109 | | |
| |||
2123 | 2130 | | |
2124 | 2131 | | |
2125 | 2132 | | |
2126 | | - | |
| 2133 | + | |
2127 | 2134 | | |
2128 | 2135 | | |
2129 | 2136 | | |
| |||
2143 | 2150 | | |
2144 | 2151 | | |
2145 | 2152 | | |
2146 | | - | |
| 2153 | + | |
2147 | 2154 | | |
2148 | 2155 | | |
2149 | 2156 | | |
| |||
2163 | 2170 | | |
2164 | 2171 | | |
2165 | 2172 | | |
2166 | | - | |
| 2173 | + | |
2167 | 2174 | | |
2168 | 2175 | | |
2169 | 2176 | | |
| |||
2173 | 2180 | | |
2174 | 2181 | | |
2175 | 2182 | | |
2176 | | - | |
| 2183 | + | |
2177 | 2184 | | |
2178 | 2185 | | |
2179 | 2186 | | |
| |||
2183 | 2190 | | |
2184 | 2191 | | |
2185 | 2192 | | |
2186 | | - | |
| 2193 | + | |
2187 | 2194 | | |
2188 | 2195 | | |
2189 | 2196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
982 | 982 | | |
983 | 983 | | |
984 | 984 | | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4498 | 4498 | | |
4499 | 4499 | | |
4500 | 4500 | | |
| 4501 | + | |
| 4502 | + | |
| 4503 | + | |
| 4504 | + | |
| 4505 | + | |
| 4506 | + | |
| 4507 | + | |
| 4508 | + | |
| 4509 | + | |
| 4510 | + | |
| 4511 | + | |
| 4512 | + | |
| 4513 | + | |
| 4514 | + | |
4501 | 4515 | | |
4502 | 4516 | | |
4503 | 4517 | | |
| |||
0 commit comments