Module - ceph_pools_pg_protection¶
This module provides for the following ansible plugin:
ceph_pools_pg_protection
Module Documentation¶
The Ceph PG overdose protection check (https://ceph.com/community/new-luminous-pg-overdose-protection) is executed by Ceph before a pool is created. If the check does not pass, then the pool is not created. When TripleO deploys Ceph it triggers ceph-ansible which creates the pools that OpenStack needs. This validation runs the same check that the overdose protection uses to determine if the user should update their CephPools, PG count, or number of OSDs. Without this check a deployer may have to wait until after Ceph is running but before the pools are created to realize the deployment will fail.
Options¶
- num_osds
The number of Ceph OSDs expected to be running during Pool creation.
TripleO does not have this parameter
In theory you can derive this parameter from TripleO parameters
- ceph_pool_default_size
The same as the TripleO CephPoolDefaultSize parameter
Number of replicas of the data
- ceph_pool_default_pg_num
The same as the TripleO CephPoolDefaultPgNum parameter
The default number of Placement Groups a pool should have
Ceph defaults this number to 16
TripleO defaults this number to 128
- ceph_pools
The same as the TripleO CephPools parameter
A list of dictionaries
Each embedded dict must have a name parameter
Optional pg_num and size parameters may be set per pool
Authors¶
John Fulton (fultonj)
Example Tasks¶
- ceph_pools_pg_protection:
ceph_pool_default_pg_num: 128
ceph_pool_default_size: 3
ceph_pools:
- application: rbd
name: volumes
pg_num: 1024
pgp_num: 1024
size: 3
- application: rbd
name: vms
pg_num: 512
pgp_num: 512
size: 3
- application: rbd
name: images
pg_num: 128
pgp_num: 128
size: 3
num_osds: 36
register: pool_creation_simulation
name: Is the CephPools parameter configured correctly?
- fail:
msg: pool_creation_simulation["message"]
name: Fail if CephPools parameter is not configured correctly
when: not pool_creation_simulation["valid_input"]
- ceph_pools_pg_protection:
ceph_pool_default_pg_num:
get_param: CephPoolDefaultPgNum
ceph_pool_default_size:
get_param: CephPoolDefaultSize
ceph_pools:
get_param: CephPools
num_osds: 36
register: pool_creation_simulation
name: Is the CephPools parameter configured correctly?