How to configure placement_targets?

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

 



Hello,

How to configure placement_targets?
Which step is wrong in my following steps?

I want to use different pools to hold user's buckets. Two pools are created,
one is '.bj-dz.rgw.buckets', the other is '.bj-dz.rgw.buckets.hot'.

1. Two placement targets are added to region map. Targets tags are 'hdd' and 'ssd'.

    ----------------begin----------------------------------
   
                    "placement_targets": [
                        {
                            "name": "default-placement",
                            "tags": [
                                "hdd"
                            ]
                        },
                        {
                            "name": "fast-placement",
                            "tags": [
                                "ssd"
                            ]
                        }
                    ],
                    "default_placement": "default-placement"
                }
   
    -----------end------------------------------------

2. Map the placement targets to the ceph backend pools.

    --------- begin --------------------------
   
        "placement_pools": [
            {
                "key": "default-placement",
                "val": {
                    "index_pool": ".bj-dz.rgw.buckets.index",
                    "data_pool": ".bj-dz.rgw.buckets",
                    "data_extra_pool": ""
                }
            },
            {
                "key": "fast-placement",
                "val": {
                    "index_pool": ".bj-dz.rgw.buckets.index",
                    "data_pool": ".bj-dz.rgw.buckets.hot",
                    "data_extra_pool": ""
                }
            }
        ]
    ----------- end --------------------------
   
3. In order to enable the user create buckets in these two
   placement_target/ceph pools, I add two placement_tags for my user.

    ---------------------- begin ----------------------------
            "keys": [
                {
                    "user": "testuser",
                    "access_key": "6R2MJWR863EREUDD0KTZ",
                    "secret_key": "74eHNNQa1oLBlvZfO2CC2hIU8cobSYxTgeRDtXtH"
                }
            ],
            "swift_keys": [],
            "caps": [],
            "op_mask": "read, write, delete",
            "default_placement": "default-placement",
            "placement_tags": [
                "ssd",
                "hdd"
            ],
    ---------------------end--------------------------------------
   
4. Test if it works.

- Test if we can create a bucket 'y-ssd' in 'fast-placement target'/'pool .bj-dz.rgw.buckets.hot'.

    ----------------------- begin ---------------------------------
   
    bucket = conn.create_bucket('y-ssd', location='fast-placement')
   
    ----------------------- end -------------------------------------

- Test if we can create a bucket 'y-normal' in 'default-placement'/'pool .bj-dz.rgw.buckets'.

    ----------------------- begin ------------------------------------
   
    bucket = conn.create_bucket('y-normal', location='default-placement')
   
    ------------------------ end ----------------------------------------

Result is: ALL these two buckets are created in pool '.bj-dz.rgw.buckets'.

5. In order to test if my 'fast-placement' target works, I change the user's
   'default_placement' to 'fast-placement'. And repeat the test in step 4.

Reusult is: All those two buckets are created in pool '.bj-dz.rgw.buckets.hot'.

6. conclusion

   The user's default placement setting works fine. But the placement tags seems not work.
   Why???
 
   I don't know if this is the right way to use different placement targets.

thx

joseph

///////Complete Region map/zone map/ user info////////////////////////////////////////

///// Region map //////////////
# radosgw-admin regionmap get --name client.radosgw.bj-dz-1 --cluster gang2
{
    "regions": [
        {
            "key": "bj",
            "val": {
                "name": "bj",
                "api_name": "bj",
                "is_master": "true",
                "endpoints": [
                    "http:\/\/s3.mydomain.com:80\/"
                ],
                "hostnames": [],
                "master_zone": "bj-dz",
                "zones": [
                    {
                        "name": "bj-dz",
                        "endpoints": [
                            "http:\/\/s3.mydomain.com:80\/"
                        ],
                        "log_meta": "true",
                        "log_data": "true",
                        "bucket_index_max_shards": 0
                    },
                    {
                        "name": "bj-xz",
                        "endpoints": [
                            "http:\/\/yhg-new:80\/"
                        ],
                        "log_meta": "true",
                        "log_data": "true",
                        "bucket_index_max_shards": 0
                    }
                ],
                "placement_targets": [
                    {
                        "name": "default-placement",
                        "tags": [
                            "hdd"
                        ]
                    },
                    {
                        "name": "fast-placement",
                        "tags": [
                            "ssd"
                        ]
                    }
                ],
                "default_placement": "default-placement"
            }
        }
    ],
    "master_region": "bj",
    "bucket_quota": {
        "enabled": false,
        "max_size_kb": -1,
        "max_objects": -1
    },
    "user_quota": {
        "enabled": false,
        "max_size_kb": -1,
        "max_objects": -1
    }
}

///// zone map ///////////////
[root@yhg-1]# radosgw-admin zone get --cluster gang2 -c /etc/ceph/gang2.conf --name client.radosgw.bj-dz-1
{
    "domain_root": ".bj-dz.domain.rgw",
    "control_pool": ".bj-dz.rgw.control",
    "gc_pool": ".bj-dz.rgw.gc",
    "log_pool": ".bj-dz.log",
    "intent_log_pool": ".bj-dz.intent-log",
    "usage_log_pool": ".bj-dz.usage",
    "user_keys_pool": ".bj-dz.users",
    "user_email_pool": ".bj-dz.users.email",
    "user_swift_pool": ".bj-dz.users.swift",
    "user_uid_pool": ".bj-dz.users.uid",
    "system_key": {
        "access_key": "CZB6EQFR7X36BUW1FYOM",
        "secret_key": "Gr934Fpaue3FaS2SQn5qE8DCjcntUqisMafUxVbw"
    },
    "placement_pools": [
        {
            "key": "default-placement",
            "val": {
                "index_pool": ".bj-dz.rgw.buckets.index",
                "data_pool": ".bj-dz.rgw.buckets",
                "data_extra_pool": ""
            }
        },
        {
            "key": "fast-placement",
            "val": {
                "index_pool": ".bj-dz.rgw.buckets.index",
                "data_pool": ".bj-dz.rgw.buckets.hot",
                "data_extra_pool": ""
            }
        }
    ]
}

//////// user info ///////////

{
    "key": "user:testuser",
    "ver": {
        "tag": "_nDultgTsPPMGNB3B2Sk2fc8",
        "ver": 1
    },
    "mtime": 1451306407,
    "data": {
        "user_id": "testuser",
        "display_name": "First User",
        "email": "",
        "suspended": 0,
        "max_buckets": 1000,
        "auid": 0,
        "subusers": [],
        "keys": [
            {
                "user": "testuser",
                "access_key": "6R2MJWR863EREUDD0KTZ",
                "secret_key": "74eHNNQa1oLBlvZfO2CC2hIU8cobSYxTgeRDtXtH"
            }
        ],
        "swift_keys": [],
        "caps": [],
        "op_mask": "read, write, delete",
        "default_placement": "fast-placement",
        "placement_tags": [
            "ssd",
            "hdd"
        ],
        "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": []
    }
}

_______________________________________________
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