Bug #12353
rgw: fails to parse HTTP_HOST=<FQDN>:<PORT> header
0%
Description
Using radosgw version 0.94.2 (5fb85614ca8f354284c713a2f9c610860720bbf3), behind an apache2 server (HTTPS terminator)
This works:
curl https://perf-tests.os.s2.scloud.switch.ch:443/data/10M.data
But this FAILS:
curl -H "Host: perf-tests.os.s2.scloud.switch.ch:443" https://perf-tests.os.s2.scloud.switch.ch:443/data/10M.data
<Error><Code>NoSuchBucket</Code></Error>
The log shows the HTTP_HOST header containing FQDN and the port, and just after the request is process it fails to parse the subdomain and domain (because of the port?):
From /var/log/ceph/ceph-radosgw.gateway.log
...
2015-07-16 14:19:11.710199 7f186b837700 20 HTTP_HOST=perf-tests.os.s2.scloud.switch.ch:443
2015-07-16 14:19:11.710435 7f186b837700 20 HTTP_USER_AGENT=Echoping/6.0.2
...
2015-07-16 14:19:11.713723 7f186b837700 1 ====== starting new request req=0x7f1c880fb140 =====
2015-07-16 14:19:11.713746 7f186b837700 2 req 6:0.000023::GET /data/10M.data::initializing
2015-07-16 14:19:11.713752 7f186b837700 10 host=perf-tests.os.s2.scloud.switch.ch:443
2015-07-16 14:19:11.713754 7f186b837700 20 subdomain= domain= in_hosted_domain=0
2015-07-16 14:19:11.713791 7f186b837700 10 s->object=10M.data s->bucket=data
2015-07-16 14:19:11.713798 7f186b837700 2 req 6:0.000075:s3:GET /data/10M.data::getting op
2015-07-16 14:19:11.713804 7f186b837700 2 req 6:0.000081:s3:GET /data/10M.data:get_obj:authorizing
2015-07-16 14:19:11.713809 7f186b837700 2 req 6:0.000086:s3:GET /data/10M.data:get_obj:reading permissions
2015-07-16 14:19:11.713838 7f186b837700 20 get_obj_state: rctx=0x7f186b8361c0 obj=.rgw:data state=0x7f1c581731f0 s->prefetch_data=0
2015-07-16 14:19:11.713847 7f186b837700 10 cache get: name=.rgw+data : type miss (requested=22, cached=0)
2015-07-16 14:19:11.716795 7f186b837700 10 cache put: name=.rgw+data
2015-07-16 14:19:11.716814 7f186b837700 10 moving .rgw+data to cache LRU end
2015-07-16 14:19:11.716841 7f186b837700 10 read_permissions on data(@[]):10M.data only_bucket=0 ret=-2002
2015-07-16 14:19:11.716905 7f186b837700 2 req 6:0.003181:s3:GET /data/10M.data:get_obj:http status=404
2015-07-16 14:19:11.716915 7f186b837700 1 ====== req done req=0x7f1c880fb140 http_status=404 ======
Related issues
History
#1 Updated by Simon Leinen about 8 years ago
The master branch seems to include a fix for this issue:
https://github.com/ceph/ceph/commit/abe4ec293d08b0314bf5c081ace2456073f3a22c
Could you backport this to hammer, please?
#2 Updated by Robin Johnson about 8 years ago
- Priority changed from Normal to High
Hammer backport PR at https://github.com/ceph/ceph/pull/6042
#3 Updated by Loïc Dachary about 8 years ago
- Status changed from New to Pending Backport
- Backport set to hammer
#4 Updated by Loïc Dachary almost 8 years ago
- Status changed from Pending Backport to Resolved