hello!
yes, dns name is configured and working perfectly, the bucket (in this example static3) is found actually, but RGW can't read CORS configuration due some reason.
2013-09-04 08:07:46.082740 7ff4bf7ee700 2 req 10:0.000275:s3:OPTIONS /::getting op
2013-09-04 08:07:46.082745 7ff4bf7ee700 2 req 10:0.000280:s3:OPTIONS /:options_cors:authorizing
2013-09-04 08:07:46.082753 7ff4bf7ee700 2 req 10:0.000287:s3:OPTIONS /:options_cors:reading permissions
2013-09-04 08:07:46.082790 7ff4bf7ee700 20 get_obj_state: rctx=0x7ff4f8003400 obj=.rgw:static3 state=0x7ff4f8005968 s->prefetch_data=0
2013-09-04 08:07:46.082810 7ff4bf7ee700 10 moving .rgw+static3 to cache LRU end
2013-09-04 08:07:46.082819 7ff4bf7ee700 10 cache get: name=.rgw+static3 : hit
2013-09-04 08:07:46.082840 7ff4bf7ee700 20 get_obj_state: s->obj_tag was set empty
2013-09-04 08:07:46.082845 7ff4bf7ee700 20 Read xattr: user.rgw.acl
2013-09-04 08:07:46.082847 7ff4bf7ee700 20 Read xattr: user.rgw.cors
2013-09-04 08:07:46.082848 7ff4bf7ee700 20 Read xattr: user.rgw.idtag
2013-09-04 08:07:46.082849 7ff4bf7ee700 20 Read xattr: user.rgw.manifest
2013-09-04 08:07:46.082855 7ff4bf7ee700 10 moving .rgw+static3 to cache LRU end
2013-09-04 08:07:46.082857 7ff4bf7ee700 10 cache get: name=.rgw+static3 : hit
2013-09-04 08:07:46.082898 7ff4bf7ee700 20 rgw_get_bucket_info: old bucket info, bucket=static3(@.rgw.buckets2[99137.2]) owner pejotes
2013-09-04 08:07:46.082921 7ff4bf7ee700 15 Read AccessControlPolicy<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>pejotes</ID><DisplayName>ofe</DisplayName></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI>http://acs.amazonaws.com/groups/global/AllUsers</URI></Grantee><Permission>FULL_CONTROL</Permission></Grant><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>pejotes</ID><DisplayName>ofe</DisplayName></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>
2013-09-04 08:07:46.082943 7ff4bf7ee700 15 Read AccessControlPolicy<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>pejotes</ID><DisplayName>ofe</DisplayName></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI>http://acs.amazonaws.com/groups/global/AllUsers</URI></Grantee><Permission>FULL_CONTROL</Permission></Grant><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>pejotes</ID><DisplayName>ofe</DisplayName></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>
2013-09-04 08:07:46.082951 7ff4bf7ee700 2 req 10:0.000486:s3:OPTIONS /:options_cors:verifying op mask
2013-09-04 08:07:46.082955 7ff4bf7ee700 20 required_mask= 1 user.op_mask=7
2013-09-04 08:07:46.082957 7ff4bf7ee700 2 req 10:0.000492:s3:OPTIONS /:options_cors:verifying op permissions
2013-09-04 08:07:46.082960 7ff4bf7ee700 2 req 10:0.000495:s3:OPTIONS /:options_cors:verifying op params
2013-09-04 08:07:46.082963 7ff4bf7ee700 2 req 10:0.000498:s3:OPTIONS /:options_cors:executing
2013-09-04 08:07:46.082966 7ff4bf7ee700 2 No CORS configuration set yet for this bucket
2013-09-04 08:07:46.083105 7ff4bf7ee700 2 req 10:0.000640:s3:OPTIONS /:options_cors:http status=403
2013-09-04 08:07:46.083548 7ff4bf7ee700 1 ====== req done req=0xbcd910 http_status=403 ======
best regards!
--
pawel
On Tue, Sep 3, 2013 at 5:17 PM, Yehuda Sadeh <yehuda@xxxxxxxxxxx> wrote:
Did you configure the virtual bucket name through host name correctly?On Tue, Sep 3, 2013 at 3:40 AM, Pawel Stefanski <pejotes@xxxxxxxxx> wrote:
> hello!
>
> I've tried with wip-6078 and git dumpling builds and got the same error
> during OPTIONS request.
>
> curl -v -X OPTIONS -H 'Access-Control-Request-Method: PUT' -H "Origin:
> http://XXXXX.pl" http://static3.XXXXX.pl/
>
>> OPTIONS / HTTP/1.1
>> User-Agent: curl/7.31.0
>> Host: static3.XXXXX.pl
>> Accept: */*
>> Access-Control-Request-Method: PUT
>> Origin: http://XXXXX.pl
>>
> < HTTP/1.1 403 Forbidden
> < Date: Tue, 03 Sep 2013 09:34:39 GMT
> * Server Apache/2.2.22 (Ubuntu) is not blacklisted
> < Server: Apache/2.2.22 (Ubuntu)
> < Accept-Ranges: bytes
> < Content-Length: 78
> < Content-Type: application/xml
> <
> <?xml version="1.0"
> encoding="UTF-8"?><Error><Code>AccessDenied</Code></Error>
>
> Of course CORS was set, but RGW can't find it, dump from log:
>
> 2013-09-03 11:34:39.876809 7f7c6dff3700 2 req 129:0.000385:s3:OPTIONS
> /:options_cors:verifying op mask
> 2013-09-03 11:34:39.876813 7f7c6dff3700 20 required_mask= 1 user.op_mask=7
> 2013-09-03 11:34:39.876815 7f7c6dff3700 2 req 129:0.000392:s3:OPTIONS
> /:options_cors:verifying op permissions
> 2013-09-03 11:34:39.876818 7f7c6dff3700 2 req 129:0.000395:s3:OPTIONS
> /:options_cors:verifying op params
> 2013-09-03 11:34:39.876821 7f7c6dff3700 2 req 129:0.000397:s3:OPTIONS
> /:options_cors:executing
> 2013-09-03 11:34:39.876824 7f7c6dff3700 2 No CORS configuration set yet for
> this bucket
> 2013-09-03 11:34:39.876907 7f7c6dff3700 2 req 129:0.000483:s3:OPTIONS
> /:options_cors:http status=403
> 2013-09-03 11:34:39.877551 7f7c6dff3700 1 ====== req done req=0x128e0e0
> http_status=403 ======
>
> Setting CORSfor static3 bucket:
>
> CORSConfiguration<CORSConfiguration><CORSRule><AllowedMethod>GET</AllowedMethod><AllowedMethod>PUT</AllowedMethod><AllowedMetho
> d>DELETE</AllowedMethod><AllowedMethod>POST</AllowedMethod><AllowedOrigin>http://static3.XXXXX.pl</AllowedOrigin><AllowedHeader>*</AllowedHeader><MaxAgeSeconds>3000</
> MaxAgeSeconds></CORSRule><CORSRule><AllowedMethod>GET</AllowedMethod><AllowedMethod>PUT</AllowedMethod><AllowedMethod>DELETE</AllowedMethod><AllowedMethod>POST</AllowedMe
> thod><AllowedOrigin>http://static3.XXXXX.pl/</AllowedOrigin><AllowedHeader>*</AllowedHeader><MaxAgeSeconds>3000</MaxAgeSeconds></CORSRule><CORSRule><AllowedMethod>GET
> </AllowedMethod><AllowedMethod>PUT</AllowedMethod><AllowedMethod>DELETE</AllowedMethod><AllowedMethod>POST</AllowedMethod><AllowedOrigin>http://XXXXX.pl/</AllowedOri
> gin><AllowedHeader>*</AllowedHeader><MaxAgeSeconds>3000</MaxAgeSeconds></CORSRule></CORSConfiguration>
> 2013-09-03 12:34:02.973999 7f7c44fa1700 20 get_obj_state:
> rctx=0x7f7c38009330 obj=.rgw:static3 state=0x7f7c38008768 s->prefetch_data=0
> 2013-09-03 12:34:02.974004 7f7c44fa1700 20 state->obj_tag is empty, not
> appending atomic test
> 2013-09-03 12:34:02.983719 7f7c44fa1700 10 cache put: name=.rgw+static3
> 2013-09-03 12:34:02.983750 7f7c44fa1700 10 moving .rgw+static3 to cache LRU
> end
> 2013-09-03 12:34:02.983756 7f7c44fa1700 10 appending xattr:
> name=user.rgw.cors bl.length()=194
> 2013-09-03 12:34:02.983801 7f7c44fa1700 10 distributing notification
> oid=notify.2 bl.length()=389
> 2013-09-03 12:34:02.986649 7f7c9bfff700 10 RGWWatcher::notify() opcode=1
> ver=1 bl.length()=389
> 2013-09-03 12:34:02.986696 7f7c9bfff700 10 cache put: name=.rgw+static3
> 2013-09-03 12:34:02.986699 7f7c9bfff700 10 moving .rgw+static3 to cache LRU
> end
> 2013-09-03 12:34:02.986703 7f7c9bfff700 10 appending xattr:
> name=user.rgw.cors bl.length()=194
> 2013-09-03 12:34:02.987861 7f7c44fa1700 10 cache put: name=.rgw+static3
> 2013-09-03 12:34:02.987872 7f7c44fa1700 10 moving .rgw+static3 to cache LRU
> end
> 2013-09-03 12:34:02.987876 7f7c44fa1700 10 appending xattr:
> name=user.rgw.cors bl.length()=194
> 2013-09-03 12:34:02.987901 7f7c44fa1700 10 distributing notification
> oid=notify.2 bl.length()=389
> 2013-09-03 12:34:02.988593 7f7c9bfff700 10 RGWWatcher::notify() opcode=1
> ver=1 bl.length()=389
> 2013-09-03 12:34:02.988624 7f7c9bfff700 10 cache put: name=.rgw+static3
> 2013-09-03 12:34:02.988627 7f7c9bfff700 10 moving .rgw+static3 to cache LRU
> end
> 2013-09-03 12:34:02.988635 7f7c9bfff700 10 appending xattr:
> name=user.rgw.cors bl.length()=194
> 2013-09-03 12:34:02.989550 7f7c44fa1700 2 req 133:0.016683:s3:PUT
> /:put_cors:http status=200
>
> Checked with:
> 0.67.1-8-gaeb4141 (aeb414135326805324d619b507274b1d0cef7067)
> 0.67.2-22-ga708c8a (a708c8ab52e5b1476405a1f817c23b8845fbaab3)
>
For that you would have needed to set 'rgw dns name' in your
ceph.conf. It seems as if it's not set and you're using it.
Yehuda
_______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com