Enable Virtual Hosted Buckets

Bug #1653111 reported by David Johannsson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Swift3
New
Undecided
Unassigned

Bug Description

I'm trying to enable Virtual hosted buckets in swift3 and the only documentation I can find is in the example proxy-server.conf file stating "Specify a host name of your Swift cluster. This enables virtual-hosted style requests."

I've set storage_domain = swiftproxy-server-01.openstacklocal in proxy-server.conf

I have a server swiftproxy-server-01.openstacklocal and I'm trying to enable omh.swiftproxy-server-01.openstacklocal, both names point to the same ip

I can do s3curl --id creds --put img.png "http://swiftproxy-server-01.openstacklocal:8080/omh/img3.png" with out a problem

but s3curl --id creds --put img.png "http://omh.swiftproxy-server-01.openstacklocal:8080/img3.png" results in Access Denied

/etc/hosts contains
1.2.3.4 swiftproxy-server-01.openstacklocal swiftproxy-server-01 omh.swiftproxy-server-01.openstacklocal

s3curl.pl contains
my @endpoints = ( '127.0.0.1','swiftproxy-server-01','swiftproxy-server-01.openstacklocal','omh.swiftproxy-server-01.openstacklocal');

The log generated by the proxy by the request is:

Dec 22 13:10:47 swiftproxy-server-01 proxy-server: User: funambol uses token s3 (trans_id txea8ba63dc53f4d55a03f3-00585bd0d7)
Dec 22 13:10:47 swiftproxy-server-01 proxy-server: User funambol:funambol has admin authorizing. (txn: txea8ba63dc53f4d55a03f3-00585bd0d7) (client_ip: 1.2.3.4)
Dec 22 13:10:47 swiftproxy-server-01 proxy-server: 1.2.3.4 1.2.3.4/Dec/2016/13/10/47 PUT /v1/AUTH_funambol/omh/img3.png HTTP/1.0 201 - curl/7.35.0 UFVUCgoKVGh1LCAy... 26458 - - txea8ba63dc53f4d55a03f3-00585bd0d7 - 0.0553 - - 1482412247.375369072 1482412247.430623055
Dec 22 13:10:58 swiftproxy-server-01 proxy-server: Calling Swift3 Middleware (txn: tx72b580319d114884a7290-00585bd0e2)
Dec 22 13:10:58 swiftproxy-server-01 proxy-server: {'headers': {'Content-Length': '26458', 'Accept': '*/*', 'User-Agent': 'curl/7.35.0', 'Host': 'omh.swiftproxy-server-01.openstacklocal:8080', 'Expect': '100-continue', 'Date': 'Thu, 22 Dec 2016 13:10:58 +0000', 'Content-Type': None, 'Authorization': 'AWS funambol:funambol:hLHVCz9uB157dFP5nLLu08mmsVA='}, 'environ': {'HTTP_AUTHORIZATION': 'AWS funambol:funambol:hLHVCz9uB157dFP5nLLu08mmsVA=', 'SCRIPT_NAME': '', 'swift.trans_id': 'tx72b580319d114884a7290-00585bd0e2', 'REQUEST_METHOD': 'PUT', 'PATH_INFO': '/img3.png', 'SERVER_PROTOCOL': 'HTTP/1.0', 'REMOTE_ADDR': '1.2.3.4', 'CONTENT_LENGTH': '26458', 'HTTP_USER_AGENT': 'curl/7.35.0', 'eventlet.posthooks': [], 'RAW_PATH_INFO': '/img3.png', 'REMOTE_PORT': '50921', 'eventlet.input': <eventlet.wsgi.Input object at 0x7f1966ad0c90>, 'wsgi.url_scheme': 'http', 'SERVER_PORT': '8080', 'HTTP_DATE': 'Thu, 22 Dec 2016 13:10:58 +0000', 'HTTP_HOST': 'omh.swiftproxy-server-01.openstacklocal:8080', 'wsgi.multithread': True, 'HTTP_EXPECT': '100-continue', 'HTTP_ACCEPT': '*/*', 'wsgi.version': (1, 0), 'SERVER_NAME': '1.2.3.4', 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <swift.common.utils.LoggerFileObject object at 0x7f1966ab3c10>, 'wsgi.multiprocess': False, 'wsgi.input': <eventlet.wsgi.Input object at 0x7f1966ad0c90>, 'CONTENT_TYPE': None, 'swift.cache': <swift.common.memcached.MemcacheRing object at 0x7f1966abb710>}}
Dec 22 13:10:58 swiftproxy-server-01 proxy-server: 1.2.3.4 1.2.3.4 22/Dec/2016/13/10/58 PUT /v1/AUTH_funambol/img3.png HTTP/1.0 499 - curl/7.35.0 UFVUCgoKVGh1LCAy... - 131 - tx72b580319d114884a7290-00585bd0e2 - 0.0010 - - 1482412258.755479097 1482412258.756458998

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.