Add device class tiers to Ceph pools

Allows specifying a particular device class ("tier") for a given pool,
for instance SSD-only or NVMe-only. This is implemented with Crush
rules on the Ceph side, and via an additional new key in the pool
Zookeeper schema which is defaulted to "default".
This commit is contained in:
2021-12-28 20:39:50 -05:00
parent 58d57d7037
commit 25fe45dd28
8 changed files with 139 additions and 47 deletions

View File

@ -1403,11 +1403,11 @@ def ceph_pool_list(zkhandler, limit=None, is_fuzzy=True):
@ZKConnection(config)
def ceph_pool_add(zkhandler, name, pgs, replcfg):
def ceph_pool_add(zkhandler, name, pgs, replcfg, tier=None):
"""
Add a Ceph RBD pool to the PVC Ceph storage cluster.
"""
retflag, retdata = pvc_ceph.add_pool(zkhandler, name, pgs, replcfg)
retflag, retdata = pvc_ceph.add_pool(zkhandler, name, pgs, replcfg, tier)
if retflag:
retcode = 200