Set appropriate application tag for pools created
Use cases are emerging for the Ceph pool application tags. Let's set appropriate name for the pools created for CephFS. Change-Id: Iea36466f5038136727b7a6b62578cb3d0f964a6e Reference: http://docs.ceph.com/docs/master/rados/operations/pools/#associate-pool-to-application
This commit is contained in:
parent
579c0e4322
commit
34a4dcc0ec
|
@ -2,3 +2,5 @@
|
||||||
*.swp
|
*.swp
|
||||||
.testrepository
|
.testrepository
|
||||||
.tox
|
.tox
|
||||||
|
__pycache__
|
||||||
|
.stestr
|
||||||
|
|
|
@ -19,6 +19,7 @@ class CephClient(RelationBase):
|
||||||
scope = scopes.GLOBAL
|
scope = scopes.GLOBAL
|
||||||
|
|
||||||
auto_accessors = ['mds_key', 'fsid', 'auth']
|
auto_accessors = ['mds_key', 'fsid', 'auth']
|
||||||
|
ceph_pool_app_name = 'cephfs'
|
||||||
|
|
||||||
@hook('{requires:ceph-mds}-relation-{joined}')
|
@hook('{requires:ceph-mds}-relation-{joined}')
|
||||||
def joined(self):
|
def joined(self):
|
||||||
|
@ -71,10 +72,12 @@ class CephClient(RelationBase):
|
||||||
rq = CephBrokerRq()
|
rq = CephBrokerRq()
|
||||||
rq.add_op_create_pool(name="{}_data".format(name),
|
rq.add_op_create_pool(name="{}_data".format(name),
|
||||||
replica_count=replicas,
|
replica_count=replicas,
|
||||||
weight=None)
|
weight=None,
|
||||||
|
app_name=self.ceph_pool_app_name)
|
||||||
rq.add_op_create_pool(name="{}_metadata".format(name),
|
rq.add_op_create_pool(name="{}_metadata".format(name),
|
||||||
replica_count=replicas,
|
replica_count=replicas,
|
||||||
weight=None)
|
weight=None,
|
||||||
|
app_name=self.ceph_pool_app_name)
|
||||||
# Create CephFS
|
# Create CephFS
|
||||||
rq.ops.append({
|
rq.ops.append({
|
||||||
'op': 'create-cephfs',
|
'op': 'create-cephfs',
|
||||||
|
|
Loading…
Reference in New Issue