Bug 1255002 - Document Swift Storage policy configuration
Summary: Document Swift Storage policy configuration
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Documentation
Version: 1.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 1.3.0
Assignee: John Wilkins
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-19 12:14 UTC by shilpa
Modified: 2015-10-05 22:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-05 22:55:19 UTC
Embargoed:


Attachments (Terms of Use)

Description shilpa 2015-08-19 12:14:47 UTC
Description of problem:
It would be nice to have Storage policy configuration explained in the document.

Version-Release number of selected component (if applicable):
ceph 1.3.0

Here are the steps I followed and it worked for me.

1. Create a new pool ".rgw.buckets.special" with desired options for example: pool customized with erasure-coding, a particular CRUSH ruleset, number of replicas, pg num, pgp num 

2. Configure placement_targets in region and zone maps:

a. #radosgw-admin region get > region.json

Add an entry “special-placement” under placement_target

{
 "name": "default",
 "api_name": "",
 "is_master": "true",
 "endpoints": [],
 "hostnames": [],
 "master_zone": "",
 "zones": [
 {
 "name": "default",
 "endpoints": [],
 "log_meta": "false",
 "log_data": "false",
 "bucket_index_max_shards": 5
 }
 ],
 "placement_targets": [
 {
 "name": "default-placement",
 "tags": []
 },
 {
 "name": "special-placement",
 "tags": []
 }
 ],
 "default_placement": "default-placement"
}


b. #radosgw-admin region set < region.json

5. Edit the zone file and add the new placement policy key under placement_pool.

a. #radosgw-admin zone get > zone.json

{
 "domain_root": ".rgw",
 "control_pool": ".rgw.control",
 "gc_pool": ".rgw.gc",
 "log_pool": ".log",
 "intent_log_pool": ".intent-log",
 "usage_log_pool": ".usage",
 "user_keys_pool": ".users",
 "user_email_pool": ".users.email",
 "user_swift_pool": ".users.swift",
 "user_uid_pool": ".users.uid",
 "system_key": {
 "access_key": "",
 "secret_key": ""
 },
 "placement_pools": [
 {
 "key": "default-placement",
 "val": {
 "index_pool": ".rgw.buckets.index",
 "data_pool": ".rgw.buckets",
 "data_extra_pool": ".rgw.buckets.extra"
 }
 },
 {
 "key": "special-placement",
 "val": {
 "index_pool": ".rgw.buckets.index",
 "data_pool": ".rgw.buckets.special",
 "data_extra_pool": ".rgw.buckets.extra"
 }
 }
 ]
}

b. Set the new zone configuration

#radosgw-admin zone set < zone.json


6. Update the region map.

#radosgw-admin regionmap update

“special-placement” should be listed as a placement_target.

7. Now restart the radosgw service.

#/etc/init.d/radosgw restart


Usage example:

#curl -i http://10.0.0.1/swift/v1/TestContainer/file.txt -X PUT -H "X-Storage-Policy: special-placement" -H "X-Auth-Token: AUTH_rgwtxxxxxx"
HTTP/1.1 201 Created
etag: d41d8cd98f00b204e9800998ecf8427e
Last-Modified: Mon, 27 Jul 2015 11:34:39 GMT
Content-type: text/plain; charset=utf-8
Content-Length: 0

Comment 3 shilpa 2015-09-23 07:10:19 UTC
Verified the doc


Note You need to log in before you can comment on or make changes to this bug.