fix swift: fixed missing Content-Type headers issue#2665
fix swift: fixed missing Content-Type headers issue#2665GiedriusS merged 5 commits intothanos-io:masterfrom
Conversation
|
Linting failed due to OOM kill, but I do not have the permission to rerun it :/ |
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
34a33fb to
d68542f
Compare
|
Tested this with https://github.com/beaukode/docker-swift-onlyone-authv2-keystone. What has tripped me is that the default region is called Not sure how no one has noticed this yet. Thanks a lot. |
…nt-type Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
437e4eb to
1f4db39
Compare
|
I have fixed up the |
|
I guess I'll merge this to fix the current code as-is and then let's work on #2732 |
|
Cool thanks 👍 |
Signed-off-by: Martin Chodur m.chodur@seznam.cz
Fixes #713
@sudhi-vm PTAL as a maintainer of the Swift storage integration
Changes
Fulloption in ListOpts. This should provide missing headers for the gophercloud library to be able to determine content-type of the response.GetRangewhich did not handle thelength: -1correctly as not set but used it leading to incorrect rangebytes=1--1instead ofbytes=1-. See theRangeparameter of theGETmethod in the Swift API docs.Verification
Before, two acceptance e2e tests for object storage were failing
Now all tests are passing
To be honest I do not know how this could have worked for anyone else. If it did maybe it could have been cased by different version of Swift for example? Or changes in the Gophercloud library?
I'd be really glad to hear from anyone using Swift already what version of Swift they have and how the Thanos is configured exactly.
Our Thanos objstore config for Swift:
Output of the
/infoof our Swift cluster{ "bulk_delete": { "max_failed_deletes": 1000, "max_deletes_per_request": 10000 }, "container_quotas": {}, "tempurl": { "outgoing_remove_headers": [ "x-object-meta-*" ], "incoming_remove_headers": [ "x-timestamp" ], "incoming_allow_headers": [], "methods": [ "GET", "HEAD", "PUT", "POST", "DELETE" ], "outgoing_allow_headers": [ "x-object-meta-public-*" ] }, "bulk_upload": { "max_failed_extractions": 1000, "max_containers_per_extraction": 10000 }, "container_sync": { "realms": {} }, "ratelimit": { "account_ratelimit": 10, "max_sleep_time_seconds": 10, "container_ratelimits": [ [ 0, 20 ] ], "container_listing_ratelimits": [ [ 0, 200 ] ] }, "slo": { "max_manifest_segments": 1000, "min_segment_size": 1, "max_manifest_size": 2097152 }, "account_quotas": {}, "swift": { "max_file_size": 1073741826, "account_listing_limit": 10000, "account_autocreate": true, "max_meta_count": 90, "max_meta_value_length": 256, "container_listing_limit": 10000, "extra_header_count": 0, "max_meta_overall_size": 4096, "version": "2.15.1", "max_meta_name_length": 128, "max_header_size": 8192, "policies": [ { "name": "Policy-0", "aliases": "Policy-0" }, { "default": true, "name": "dev-test", "aliases": "dev-test" } ], "max_object_name_length": 1024, "max_account_name_length": 256, "strict_cors_mode": true, "allow_account_management": true, "max_container_name_length": 256 }, "swift3": { "max_upload_part_num": 1000, "allow_multipart_uploads": true, "max_bucket_listing": 1000, "version": "1.11.1.dev142", "max_parts_listing": 1000, "max_multi_delete_objects": 1000 } }