Make the pg and pgp value configurable

Change-Id: I99cca8c3830077736f71a7ab1abd3818688f9bb1
This commit is contained in:
caoyuan 2017-09-15 23:24:43 +08:00
parent 641a7f2790
commit 8fed5e2e62
11 changed files with 29 additions and 1 deletions

View File

@ -628,6 +628,10 @@ ceph_erasure_profile: "k=4 m=2 ruleset-failure-domain=host"
ceph_rule: "default host {{ 'indep' if ceph_pool_type == 'erasure' else 'firstn' }}" ceph_rule: "default host {{ 'indep' if ceph_pool_type == 'erasure' else 'firstn' }}"
ceph_cache_rule: "cache host firstn" ceph_cache_rule: "cache host firstn"
# Set the pgs and pgps for pool
ceph_pool_pg_num: 128
ceph_pool_pgp_num: 128
################################################ ################################################
# VMware - OpenStack VMware support # VMware - OpenStack VMware support
################################################ ################################################

View File

@ -25,7 +25,7 @@
when: pool_type == "replicated" when: pool_type == "replicated"
- name: Creating ceph pool - name: Creating ceph pool
command: docker exec ceph_mon ceph osd pool create {{ pool_name }} 128 128 {{ pool_type }} {{ 'erasure-profile' if pool_type == 'erasure' else '' }} disks command: docker exec ceph_mon ceph osd pool create {{ pool_name }} {{ pool_pg_num }} {{ pool_pgp_num }} {{ pool_type }} {{ 'erasure-profile' if pool_type == 'erasure' else '' }} disks
delegate_to: "{{ groups['ceph-mon'][0] }}" delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False changed_when: False
failed_when: False failed_when: False

View File

@ -64,9 +64,14 @@ ceph_cinder_backup_cache_mode: "{{ ceph_cache_mode }}"
cinder_pool_name: "{{ ceph_cinder_pool_name }}" cinder_pool_name: "{{ ceph_cinder_pool_name }}"
cinder_pool_type: "{{ ceph_cinder_pool_type }}" cinder_pool_type: "{{ ceph_cinder_pool_type }}"
cinder_cache_mode: "{{ ceph_cinder_cache_mode }}" cinder_cache_mode: "{{ ceph_cinder_cache_mode }}"
cinder_pool_pg_num: "{{ ceph_pool_pg_num }}"
cinder_pool_pgp_num: "{{ ceph_pool_pgp_num }}"
cinder_backup_pool_name: "{{ ceph_cinder_backup_pool_name }}" cinder_backup_pool_name: "{{ ceph_cinder_backup_pool_name }}"
cinder_backup_pool_type: "{{ ceph_cinder_backup_pool_type }}" cinder_backup_pool_type: "{{ ceph_cinder_backup_pool_type }}"
cinder_backup_cache_mode: "{{ ceph_cinder_backup_cache_mode }}" cinder_backup_cache_mode: "{{ ceph_cinder_backup_cache_mode }}"
cinder_backup_pool_pg_num: "{{ ceph_pool_pg_num }}"
cinder_backup_pool_pgp_num: "{{ ceph_pool_pgp_num }}"
#################### ####################

View File

@ -35,12 +35,16 @@
pool_name: "{{ cinder_pool_name }}" pool_name: "{{ cinder_pool_name }}"
pool_type: "{{ cinder_pool_type }}" pool_type: "{{ cinder_pool_type }}"
cache_mode: "{{ cinder_cache_mode }}" cache_mode: "{{ cinder_cache_mode }}"
pool_pg_num: "{{ cinder_pool_pg_num }}"
pool_pgp_num: "{{ cinder_pool_pgp_num }}"
- include: ../../ceph_pools.yml - include: ../../ceph_pools.yml
vars: vars:
pool_name: "{{ cinder_backup_pool_name }}" pool_name: "{{ cinder_backup_pool_name }}"
pool_type: "{{ cinder_backup_pool_type }}" pool_type: "{{ cinder_backup_pool_type }}"
cache_mode: "{{ cinder_backup_cache_mode }}" cache_mode: "{{ cinder_backup_cache_mode }}"
pool_pg_num: "{{ cinder_backup_pool_pg_num }}"
pool_pgp_num: "{{ cinder_backup_pool_pgp_num }}"
# TODO(SamYaple): Improve changed_when tests # TODO(SamYaple): Improve changed_when tests
- name: Pulling cephx keyring for cinder - name: Pulling cephx keyring for cinder

View File

@ -34,6 +34,8 @@ ceph_glance_cache_mode: "{{ ceph_cache_mode }}"
glance_pool_name: "{{ ceph_glance_pool_name }}" glance_pool_name: "{{ ceph_glance_pool_name }}"
glance_pool_type: "{{ ceph_glance_pool_type }}" glance_pool_type: "{{ ceph_glance_pool_type }}"
glance_cache_mode: "{{ ceph_glance_cache_mode }}" glance_cache_mode: "{{ ceph_glance_cache_mode }}"
glance_pool_pg_num: "{{ ceph_pool_pg_num }}"
glance_pool_pgp_num: "{{ ceph_pool_pgp_num }}"
#################### ####################

View File

@ -19,6 +19,8 @@
pool_name: "{{ glance_pool_name }}" pool_name: "{{ glance_pool_name }}"
pool_type: "{{ glance_pool_type }}" pool_type: "{{ glance_pool_type }}"
cache_mode: "{{ glance_cache_mode }}" cache_mode: "{{ glance_cache_mode }}"
pool_pg_num: "{{ glance_pool_pg_num }}"
pool_pgp_num: "{{ glance_pool_pgp_num }}"
# TODO(SamYaple): Improve changed_when tests # TODO(SamYaple): Improve changed_when tests
- name: Pulling cephx keyring - name: Pulling cephx keyring

View File

@ -45,6 +45,8 @@ ceph_gnocchi_cache_mode: "{{ ceph_cache_mode }}"
gnocchi_pool_name: "{{ ceph_gnocchi_pool_name }}" gnocchi_pool_name: "{{ ceph_gnocchi_pool_name }}"
gnocchi_pool_type: "{{ ceph_gnocchi_pool_type }}" gnocchi_pool_type: "{{ ceph_gnocchi_pool_type }}"
gnocchi_cache_mode: "{{ ceph_gnocchi_cache_mode }}" gnocchi_cache_mode: "{{ ceph_gnocchi_cache_mode }}"
gnocchi_pool_pg_num: "{{ ceph_pool_pg_num }}"
gnocchi_pool_pgp_num: "{{ ceph_pool_pgp_num }}"
#################### ####################

View File

@ -29,6 +29,8 @@
pool_name: "{{ gnocchi_pool_name }}" pool_name: "{{ gnocchi_pool_name }}"
pool_type: "{{ gnocchi_pool_type }}" pool_type: "{{ gnocchi_pool_type }}"
cache_mode: "{{ gnocchi_cache_mode }}" cache_mode: "{{ gnocchi_cache_mode }}"
pool_pg_num: "{{ gnocchi_pool_pg_num }}"
pool_pgp_num: "{{ gnocchi_pool_pgp_num }}"
# TODO(SamYaple): Improve changed_when tests # TODO(SamYaple): Improve changed_when tests
- name: Pulling cephx keyring - name: Pulling cephx keyring

View File

@ -144,6 +144,8 @@ ceph_nova_cache_mode: "{{ ceph_cache_mode }}"
nova_pool_name: "{{ ceph_nova_pool_name }}" nova_pool_name: "{{ ceph_nova_pool_name }}"
nova_pool_type: "{{ ceph_nova_pool_type }}" nova_pool_type: "{{ ceph_nova_pool_type }}"
nova_cache_mode: "{{ ceph_nova_cache_mode }}" nova_cache_mode: "{{ ceph_nova_cache_mode }}"
nova_pool_pg_num: "{{ ceph_pool_pg_num }}"
nova_pool_pgp_num: "{{ ceph_pool_pgp_num }}"
# Discard option for nova managed disks. Requires libvirt (1, 0, 6) or later and # Discard option for nova managed disks. Requires libvirt (1, 0, 6) or later and
# qemu (1, 6, 0) or later. Set to "" to disable. # qemu (1, 6, 0) or later. Set to "" to disable.

View File

@ -27,6 +27,8 @@
pool_name: "{{ nova_pool_name }}" pool_name: "{{ nova_pool_name }}"
pool_type: "{{ nova_pool_type }}" pool_type: "{{ nova_pool_type }}"
cache_mode: "{{ nova_cache_mode }}" cache_mode: "{{ nova_cache_mode }}"
pool_pg_num: "{{ nova_pool_pg_num }}"
pool_pgp_num: "{{ nova_pool_pgp_num }}"
# TODO(SamYaple): Improve changed_when tests # TODO(SamYaple): Improve changed_when tests
- name: Pulling cephx keyring for nova - name: Pulling cephx keyring for nova

View File

@ -239,6 +239,9 @@ kolla_internal_vip_address: "10.10.10.254"
# Integrate ceph rados object gateway with openstack keystone # Integrate ceph rados object gateway with openstack keystone
#enable_ceph_rgw_keystone: "no" #enable_ceph_rgw_keystone: "no"
# Set the pgs and pgps for pool
#ceph_pool_pg_num: 128
#ceph_pool_pgp_num: 128
############################# #############################
# Keystone - Identity Options # Keystone - Identity Options