proxy-server generates malformed URL on S3 request
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Invalid
|
Undecided
|
Unassigned | ||
Swift3 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm trying to setup S3 test bench for developers, using Devstack (using stable/newton branch in devstack configuration file - local.conf). While I'm able to browse containers and objects using CLI (openstack container / object, swift), I can't get access to containers using s3curl. In logs (full log is attached) I see two different URLs at final stage:
------------- “openstack container list” command, issued locally
[ ... ]
proxy-server: Using identity: {'service_roles': [], 'roles': [u'admin'], 'project_domain': (u'default', u'Default'), 'auth_version': 3, 'user': (u'eac0298a83e4
[ ... ]
proxy-server: de.vs.ta.ck de.vs.ta.ck 27/Oct/
You see correct URL in the request above.
------------- S3 session using s3curl from re.mo.te.host
[ ... ]
proxy-server: Using identity: {'service_roles': [], 'roles': [u'admin'], 'project_domain': (u'default', u'Default'), 'auth_version': 3, 'user': (u'eac0298a83e4
[ ... ]
proxy-server: re.mo.te.host re.mo.te.host 27/Oct/
URL above is malformed and, of course, will return nothing. It seems something can bee wrong with proxy-server - having same information, it produces different request URLs for different kinds of access (swift client access vs remote S3 access).
For S3 access I created EC2 credentials:
/opt# openstack credential create --type ec2 --project admin admin '{"access" : "admin", "secret" : "adm1n0"}'
+------
| Field | Value |
+------
| blob | {"access" : "admin", "secret" : "adm1n0"} |
| id | 8c6976e5b541041
| project_id | 2d7365b17c8147e
| type | ec2 |
| user_id | eac0298a83e44b1
+------
and, of course, there are created containers and objects for admin/admin:
/opt# openstack object list c0
+----------+
| Name |
+----------+
| list.txt |
+----------+
Any ideas on what's is wrong and how to go ahead? I'm ready to answer any questions and provide any additional information on this. Full log of proxy-server, as well proxy-server.conf are attached.
Thank you!
Changed in swift: | |
status: | New → Invalid |
Changed in swift3: | |
status: | New → Invalid |
I'm not sure I understand; the did the client get an error? It looks like everything was successful:
GET / HTTP/1.0 200
I guess the trouble is that the proxy is logging the path that the user requested (in this case '/') rather than the backend path? You can have swift3 emit log lines for the individual subrequests using the force_swift_ request_ proxy_log config option [1]. Note that swift3 typically spawns several subrequests for any one client request.
[1] https:/ /github. com/openstack/ swift3/ blob/1. 11/etc/ proxy-server. conf-sample# L110-L118