Issue in communication of swift client and RADOSGW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to use swift as frontend with ceph storage. I have a small cluster(1MON, 2OSD). My cluster is working fine. I have installed radosgw on one of my machine and radosgw(gateway1) is also up and communicating with cluster.

Now I have installed swift client and created user and subuser. But I am unable to get bucket for the user.

Below is my config file :

/etc/ceph/ceph.conf
[global]
public_network = 172.18.59.0/24
osd_pool_default_size = 2
fsid = 17848c62-d69e-4991-a4dd-298358bb19ea
mon_initial_members = ceph4-Standard-PC-i440FX-PIIX-1996
mon_host = 172.18.59.205
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
filestore_xattr_use_omap = true
debug ms = 1
debug rgw = 20
[client.radosgw.gateway1]
host = ceph-Veriton-Series
#rgw_dns_name = 172.18.59.201
rgw_url = "http://172.18.59.201:7481"
#rgw_admin=admin
keyring = /etc/ceph/keyring.radosgw.gateway1
rgw socket path = /var/run/ceph/ceph-client.radosgw.gateway1.asok
#rgw frontends=civetweb port=7481
log file = /var/log/radosgw/ceph-client.radosgw.gateway1.log
rgw print continue = false


The file at location /etc/apache2/conf-available/gateway1.conf:

<VirtualHost *:80>
        ServerName 172.18.59.201.ceph-Veriton-Series
        ServerAdmin ceph@172.18.59.201
        DocumentRoot /var/www
        # rewrting rules only need for amazon s3
        RewriteEngine On
        RewriteRule ^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1&params=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
        FastCgiExternalServer /var/www/s3gw.fcgi -socket /var/run/ceph/ceph-client.radosgw.gateway1.asok
        <IfModule mod_fastcgi.c>
                <Directory /var/www>
                        Options +ExecCGI
                        AllowOverride All
                        SetHandler fastcgi-script
                        Order allow,deny
                        Allow from all
                        AuthBasicAuthoritative Off
                </Directory>
        </IfModule>
        AllowEncodedSlashes On
        ErrorLog /var/log/apache2/error.log
        CustomLog /var/log/apache2/access.log combined
        ServerSignature Off
</VirtualHost>

My cluster state  is:

ceph@ceph-Veriton-Series:/etc/apache2/conf-available$ ceph -s
    cluster 17848c62-d69e-4991-a4dd-298358bb19ea
     health HEALTH_OK
     monmap e1: 1 mons at {ceph4-Standard-PC-i440FX-PIIX-1996=172.18.59.205:6789/0}, election epoch 1, quorum 0 ceph4-Standard-PC-i440FX-PIIX-1996
     osdmap e1071: 2 osds: 2 up, 2 in
      pgmap v3493: 264 pgs, 12 pools, 1145 kB data, 59 objects
            82106 MB used, 79394 MB / 166 GB avail
                 264 active+clean
ceph@ceph-Veriton-Series:/etc/apache2/conf-available$


user info:
sudo radosgw-admin user info --uid=testuser
{ "user_id": "testuser",
  "display_name": "First User",
  "email": "",
  "suspended": 0,
  "max_buckets": 1000,
  "auid": 0,
  "subusers": [
        { "id": "testuser:swift",
          "permissions": "<none>"}],
  "keys": [
        { "user": "testuser",
          "access_key": "NC4E8QHUSNDWDX18M6GB",
          "secret_key": "kRnFVL\/Z5oUur15E+CNbGPqCLDpBV1AgvLHTos7T"},
        { "user": "testuser:swift",
          "access_key": "R8UYRI7HXNW05BTJE2N7",
          "secret_key": ""}],
  "swift_keys": [
        { "user": "testuser:swift",
          "secret_key": "eSWgLkDXTBPxOKf2cMWDdHwZPuFHAnDwQ3aUYXRF"}],
  "caps": [],
  "op_mask": "read, write, delete",
  "default_placement": "",
  "placement_tags": [],
  "bucket_quota": { "enabled": false,
      "max_size_kb": -1,
      "max_objects": -1},
  "user_quota": { "enabled": false,
      "max_size_kb": -1,
      "max_objects": -1},
  "temp_url_keys": []}

I am using below script to get bucket:

import boto
import boto.s3.connection
access_key = 'NC4E8QHUSNDWDX18M6GB'
secret_key = 'kRnFVL\/Z5oUur15E+CNbGPqCLDpBV1AgvLHTos7T'
conn = boto.connect_s3(
aws_access_key_id = access_key,
aws_secret_access_key = secret_key,
host = 'ceph-Veriton-Series',
is_secure=False,
calling_format = boto.s3.connection.OrdinaryCallingFormat(),
)
bucket = conn.create_bucket('my-new-bucket')
for bucket in conn.get_all_buckets():
        print "{name}\t{created}".format(
                name = bucket.name,
                created = bucket.creation_date,
)
When I run the script below is the error:

ceph@ceph-Veriton-Series:~$ python s3test.py
Traceback (most recent call last):
  File "s3test.py", line 12, in <module>
    bucket = conn.create_bucket('my-new-bucket')
  File "/usr/lib/python2.7/dist-packages/boto/s3/connection.py", line 504, in create_bucket
    response.status, response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 405 Method Not Allowed
None


Below are the logs from log file:

015-07-03 11:46:38.940247 af9f7b40  1 -- 172.18.59.201:0/1001130 --> 172.18.59.204:6800/3675 -- osd_op(client.5314.0:126 gc.24 [call lock.unlock] 14.8bdc9d ondisk+write e1071) v4 -- ?+0 0xb3c08ae8 con 0xb7f6f1e8
2015-07-03 11:46:39.039568 b3bffb40  1 -- 172.18.59.201:0/1001130 <== osd.0 172.18.59.204:6800/3675 109 ==== osd_op_reply(126 gc.24 [call] v1071'856 uv856 _ondisk_ = 0) v6 ==== 172+0+0 (585433070 0 0) 0xb3201328 con 0xb7f6f1e8
2015-07-03 11:46:39.039740 af9f7b40  1 -- 172.18.59.201:0/1001130 --> 172.18.59.204:6800/3675 -- osd_op(client.5314.0:127 gc.25 [call lock.lock] 14.51baec8a ondisk+write e1071) v4 -- ?+0 0xb3c08ae8 con 0xb7f6f1e8
2015-07-03 11:46:39.122459 b3bffb40  1 -- 172.18.59.201:0/1001130 <== osd.0 172.18.59.204:6800/3675 110 ==== osd_op_reply(127 gc.25 [call] v1071'427 uv427 _ondisk_ = 0) v6 ==== 172+0+0 (1862396973 0 0) 0xb3201000 con 0xb7f6f1e8
2015-07-03 11:46:39.122528 af9f7b40  1 -- 172.18.59.201:0/1001130 --> 172.18.59.204:6800/3675 -- osd_op(client.5314.0:128 gc.25 [call rgw.gc_list] 14.51baec8a ack+read e1071) v4 -- ?+0 0xb3c08ae8 con 0xb7f6f1e8
2015-07-03 11:46:39.123741 b3bffb40  1 -- 172.18.59.201:0/1001130 <== osd.0 172.18.59.204:6800/3675 111 ==== osd_op_reply(128 gc.25 [call] v0'0 uv427 _ondisk_ = 0) v6 ==== 172+0+11 (2703367615 0 1993775135) 0xb3201000 con 0xb7f6f1e8
2015-07-03 11:46:39.123799 af9f7b40  1 -- 172.18.59.201:0/1001130 --> 172.18.59.204:6800/3675 -- osd_op(client.5314.0:129 gc.25 [call lock.unlock] 14.51baec8a ondisk+write e1071) v4 -- ?+0 0xb3c08ae8 con 0xb7f6f1e8
2015-07-03 11:46:39.208110 b3bffb40  1 -- 172.18.59.201:0/1001130 <== osd.0 172.18.59.204:6800/3675 112 ==== osd_op_reply(129 gc.25 [call] v1071'428 uv428 _ondisk_ = 0) v6 ==== 172+0+0 (670055365 0 0) 0xb3201328 con 0xb7f6f1e8
2015-07-03 11:46:39.208228 af9f7b40  2 garbage collection: stop
2015-07-03 11:46:40.280120 b15feb40  1 -- 172.18.59.201:0/1001130 --> 172.18.59.203:6800/2946 -- ping v1 -- ?+0 0xb17196c0 con 0xb7f68be8
2015-07-03 11:46:40.280158 b15feb40  1 -- 172.18.59.201:0/1001130 --> 172.18.59.204:6800/3675 -- ping v1 -- ?+0 0xb1719868 con 0xb7f6f1e8
2015-07-03 11:46:45.280256 b15feb40  1 -- 172.18.59.201:0/1001130 --> 172.18.59.203:6800/2946 -- ping v1 -- ?+0 0xb1719868 con 0xb7f68be8
2015-07-03 11:46:45.280295 b15feb40  1 -- 172.18.59.201:0/1001130 --> 172.18.59.204:6800/3675 -- ping v1 -- ?+0 0xb171d028 con 0xb7f6f1e8


The response is awaited.

Thanks in advance,
Bindu



_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux