This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vagrant@saio:~$ curl -H 'x-auth-token: AUTH_tk5c4a1e905d2a40ab98e9c955fc97e2c6' "http://saio:8080/v1/AUTH_test/test" -I | |
| HTTP/1.1 204 No Content | |
| X-Container-Object-Count: 10 | |
| Accept-Ranges: bytes | |
| X-Storage-Policy: default | |
| Last-Modified: Mon, 02 Mar 2020 16:34:12 GMT | |
| X-Container-Bytes-Used: 80 | |
| X-Timestamp: 1583166844.22391 | |
| Content-Type: text/plain; charset=utf-8 | |
| Vary: Accept |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/swift/common/utils.py b/swift/common/utils.py | |
| index 392312800..5deab454f 100644 | |
| --- a/swift/common/utils.py | |
| +++ b/swift/common/utils.py | |
| @@ -47,6 +47,7 @@ import ctypes | |
| import ctypes.util | |
| from copy import deepcopy | |
| from optparse import OptionParser | |
| +import traceback | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vagrant@saio:~$ curl -v -H 'x-auth-token: AUTH_tkc955ef07f0ee4fa1b985b287e7c1d977' http://saio:8080/AUTH_test/foo/bar | |
| * Trying 127.0.1.1... | |
| * TCP_NODELAY set | |
| * Connected to saio (127.0.1.1) port 8080 (#0) | |
| > GET /AUTH_test/foo/bar HTTP/1.1 | |
| > Host: saio:8080 | |
| > User-Agent: curl/7.58.0 | |
| > Accept: */* | |
| > x-auth-token: AUTH_tkc955ef07f0ee4fa1b985b287e7c1d977 | |
| > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| from swift.common.ring import RingBuilder | |
| from argparse import ArgumentParser | |
| parser = ArgumentParser() | |
| parser.add_argument('--full', action='store_true', help='put weight up to full') | |
| def main(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vagrant@saio:~$ curl -w "%{time_total}|%{speed_upload}" -X POST "http://127.0.0.1:8090" -T file_200.txt | |
| (8950) accepted ('127.0.0.1', 46762) | |
| /srv/node1/sdb1/objects/59 | |
| os write time is - 1.09243893623 | |
| fsync time is - 0.254086017609 | |
| 127.0.0.1 - - [08/Jan/2020 15:02:40] "POST /file_200.txt HTTP/1.1" 200 218 1.348623 | |
| The Begining | |
| ****************************** | |
| 3566de3a97906edb98d004d6b947ae9b | |
| ****************************** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from argparse import ArgumentParser | |
| from collections import defaultdict | |
| import sys | |
| from swift.common.internal_client import InternalClient | |
| from swift.common.wsgi import ConfigString | |
| from swift.container.sync import ic_conf_body | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/swift/common/middleware/symlink.py b/swift/common/middleware/symlink.py | |
| index 80551e6e2..1185d02bc 100644 | |
| --- a/swift/common/middleware/symlink.py | |
| +++ b/swift/common/middleware/symlink.py | |
| @@ -512,6 +512,8 @@ class SymlinkObjectContext(WSGIContext): | |
| new_req = make_subrequest( | |
| req.environ, path=wsgi_quote(symlink_target_path), method='HEAD', | |
| swift_source='SYM') | |
| + if req.allow_reserved_names: | |
| + new_req.headers['X-Backend-Allow-Reserved-Names'] = 'true' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vagrant@saio:~$ swift post test -H 'x-versions-enabled: true' | |
| vagrant@saio:~$ for i in {1..10}; do swift upload test test; done | |
| test | |
| test | |
| test | |
| test | |
| test | |
| test | |
| test | |
| test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vagrant@saio:~$ swift list | |
| s3api-test-versioning-09c55a7246a948679dc054bb58b5d6c8 | |
| vagrant@saio:~$ swift list s3api-test-versioning-09c55a7246a948679dc054bb58b5d6c8 --json | |
| [ | |
| { | |
| "bytes": 55, | |
| "content_type": "binary/octet-stream", | |
| "hash": "36219fbb5e2de8b89565dcd15fb1afed", | |
| "last_modified": "2019-10-28T22:38:10.704330", | |
| "name": "s3api-test-versioned-obj-69225ae9863d49e79d0147e6d79ff24a", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vagrant@saio:~$ curl http://localhost:6041/sdb4/28/AUTH_test/test/foo/blah/whatever/hahah -I | |
| HTTP/1.1 204 No Content | |
| X-Backend-Sharding-State: unsharded | |
| X-Backend-Timestamp: 1571170834.78939 | |
| X-Container-Object-Count: 0 | |
| X-Put-Timestamp: 1571170834.76786 | |
| X-Backend-Put-Timestamp: 1571170834.76786 | |
| Last-Modified: Tue, 15 Oct 2019 20:20:35 GMT | |
| X-Backend-Delete-Timestamp: 0000000000.00000 | |
| X-Container-Bytes-Used: 0 |