The saga continues...

So, after fiddling with haproxy a bit, I managed to make sure that my
requests were hitting the RADOS Gateway.

NOW, I get a 403 from my ruby script:

2014-03-12 23:34:08.289670 7fda9bfbf700  1 ====== starting new request
req=0x215a780 =====
2014-03-12 23:34:08.305105 7fda9bfbf700  1 ====== req done req=0x215a780
http_status=403 ======

The aws-s3 gem forces the Host header to be set to s3.amazonaws.com -- and
I am wondering if this could potentially cause a problem. Is that the case?
Or is radosgw able to just know where it is supposed to look for objects
based on its configuration? I assume the latter, otherwise we would have
multi-tenant radosgw instead of needing to have an instance per zone.

So does it ignore the Host header?

Is this 403 related to my problems with the user error I found earlier
where I'm unable to view the user with the radosgw-admin tool?



On Wed, Mar 12, 2014 at 1:54 PM, Greg Poirier <greg.poir...@opower.com>wrote:

> Also... what are linger_ops?
>
> ceph --admin-daemon /var/run/ceph/ceph-client.radosgw.<hostname>.asok
> objecter_requests
> { "ops": [],
>   "linger_ops": [
>         { "linger_id": 1,
>           "pg": "7.4322fa9f",
>           "osd": 25,
>           "object_id": "notify.0",
>           "object_locator": "@7",
>           "snapid": "head",
>           "registering": "head",
>           "registered": "head"},
>         { "linger_id": 2,
>           "pg": "7.16dafda0",
>           "osd": 132,
>           "object_id": "notify.1",
>           "object_locator": "@7",
>           "snapid": "head",
>           "registering": "head",
>           "registered": "head"},
>         { "linger_id": 3,
>           "pg": "7.88aa5c95",
>           "osd": 32,
>           "object_id": "notify.2",
>           "object_locator": "@7",
>           "snapid": "head",
>           "registering": "head",
>           "registered": "head"},
>         { "linger_id": 4,
>           "pg": "7.f8c99aee",
>           "osd": 62,
>           "object_id": "notify.3",
>           "object_locator": "@7",
>           "snapid": "head",
>           "registering": "head",
>           "registered": "head"},
>         { "linger_id": 5,
>           "pg": "7.a204812d",
>           "osd": 129,
>           "object_id": "notify.4",
>           "object_locator": "@7",
>           "snapid": "head",
>           "registering": "head",
>           "registered": "head"},
>         { "linger_id": 6,
>           "pg": "7.31099063",
>           "osd": 28,
>           "object_id": "notify.5",
>           "object_locator": "@7",
>           "snapid": "head",
>           "registering": "head",
>           "registered": "head"},
>         { "linger_id": 7,
>           "pg": "7.97c520d4",
>           "osd": 135,
>           "object_id": "notify.6",
>           "object_locator": "@7",
>           "snapid": "head",
>           "registering": "head",
>           "registered": "head"},
>         { "linger_id": 8,
>           "pg": "7.84ada7c9",
>           "osd": 94,
>           "object_id": "notify.7",
>           "object_locator": "@7",
>           "snapid": "head",
>           "registering": "head",
>           "registered": "head"}],
>   "pool_ops": [],
>   "pool_stat_ops": [],
>   "statfs_ops": [],
>   "command_ops": []}
>
>
> On Wed, Mar 12, 2014 at 10:45 AM, Greg Poirier <greg.poir...@opower.com>wrote:
>
>> Rados GW and Ceph versions installed:
>> Version: 0.67.7-1precise
>>
>> I create a user:
>> radosgw-admin --name client.radosgw.<hostname> user create --uid test
>> --display-name "Test User"
>>
>> It outputs some JSON that looks convincing:
>> { "user_id": "test",
>>   "display_name": "test user",
>>   "email": "",
>>   "suspended": 0,
>>   "max_buckets": 1000,
>>   "auid": 0,
>>   "subusers": [],
>>   "keys": [
>>         { "user": "test",
>>           "access_key": "<snip>",
>>           "secret_key": "<snip>"},
>>         { "user": "test",
>>           "access_key": "<snip>",
>>           "secret_key": "<snip>"}],
>>   "swift_keys": [],
>>   "caps": [],
>>   "op_mask": "read, write, delete",
>>   "default_placement": "",
>>   "placement_tags": []}
>>
>> There are two keys because I have tried this twice.
>>
>> I can see it in metadata list:
>> radosgw-admin --name client.radosgw.<hostname> metadata list user
>> [
>>     "test",
>>     "us-east-2",
>>     "us-west-1"]
>>
>> I then try to get user info:
>>
>> radosgw-admin --name client.radosgw.<hostname> user info test
>> could not fetch user info: no user info saved
>>
>> I try to create a bucket with the user using Ruby's aws/s3 API:
>>
>> equire 'aws/s3'
>>
>> AWS::S3::Base.establish_connection!(
>>   access_key_id: '<snip>',
>>   secret_access_key: '<snip>',
>>   use_ssl: true,
>>   server: '<snip>',
>>   persistent: true
>> )
>>
>> AWS::S3::Bucket.create('test')
>>
>> file = 'sloth.txt'
>>
>> AWS::S3::S3Object.store(file, open(file), 'test')
>>
>> bucket = AWS::S3::Bucket.find('test')
>>
>> puts bucket
>>
>> bucket.each do |object|
>>   puts
>> "#{object.key}\t#{object.about['content-length']}\t#{object.about['last-modified']}"
>> end
>>
>> And I get the following:
>> #<AWS::S3::Bucket:0x007f9852854e58>
>> /Users/greg.poirier/.rvm/gems/ruby-1.9.3-p429/gems/aws-s3-0.6.3/lib/aws/s3/base.rb:235:in
>> `method_missing': undefined local variable or method `name' for
>> #<AWS::S3::Bucket:0x007f9852854e58> (NameError)
>>  from
>> /Users/greg.poirier/.rvm/gems/ruby-1.9.3-p429/gems/aws-s3-0.6.3/lib/aws/s3/bucket.rb:313:in
>> `reload!'
>> from
>> /Users/greg.poirier/.rvm/gems/ruby-1.9.3-p429/gems/aws-s3-0.6.3/lib/aws/s3/bucket.rb:242:in
>> `objects'
>>  from
>> /Users/greg.poirier/.rvm/gems/ruby-1.9.3-p429/gems/aws-s3-0.6.3/lib/aws/s3/bucket.rb:253:in
>> `each'
>> from test.rb:21:in `<main>'
>>
>> The bucket fails to be created:
>>
>> radosgw-admin --name client.radosgw.<hostname> bucket list
>> []
>>
>> And also this:
>>
>> radosgw-admin --name client.radosgw.<hostname> metadata list bucket
>> []2014-03-12 17:42:42.221112 7f426b779780 -1 failed to list objects
>> pool_iterate returned r=-2
>>
>>
>> So clearly there is something going on here. My questions:
>>
>> Is this failure to create a bucket related to do the "no user info saved"
>> error?
>>
>> What would cause the "no user info saved" error?
>>
>> What may be causing the bucket to not be created?
>>
>>
>>
>
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to