mirror of https://github.com/ceph/ceph-ansible.git
mdss: do not make pg_num a mandatory params
When playing ceph-mds role, mon nodes have set a fact with the default pg num for osd pools, we can simply default to this value for cephfs pools (`cephfs_pools` variable). At the moment the variable definition for `cephfs_pools` looks like: ``` cephfs_pools: - { name: "{{ cephfs_data }}", pgs: "" } - { name: "{{ cephfs_metadata }}", pgs: "" } ``` and we have a task in `ceph-validate` to ensure `pgs` has been set to a valid value. We could simply avoid this check by setting the default value of `pgs` to `hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num']` and let to users the possibility to override this value. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1581164 Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/2658/head
parent
34e646e767
commit
c68126d6fd
|
@ -352,8 +352,8 @@ dummy:
|
|||
#cephfs_metadata: cephfs_metadata # name of the metadata pool for a given filesystem
|
||||
|
||||
#cephfs_pools:
|
||||
# - { name: "{{ cephfs_data }}", pgs: "" }
|
||||
# - { name: "{{ cephfs_metadata }}", pgs: "" }
|
||||
# - { name: "{{ cephfs_data }}", pgs: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}" }
|
||||
# - { name: "{{ cephfs_metadata }}", pgs: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}" }
|
||||
|
||||
## OSD options
|
||||
#
|
||||
|
|
|
@ -352,8 +352,8 @@ ceph_repository: rhcs
|
|||
#cephfs_metadata: cephfs_metadata # name of the metadata pool for a given filesystem
|
||||
|
||||
#cephfs_pools:
|
||||
# - { name: "{{ cephfs_data }}", pgs: "" }
|
||||
# - { name: "{{ cephfs_metadata }}", pgs: "" }
|
||||
# - { name: "{{ cephfs_data }}", pgs: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}" }
|
||||
# - { name: "{{ cephfs_metadata }}", pgs: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}" }
|
||||
|
||||
## OSD options
|
||||
#
|
||||
|
|
|
@ -344,8 +344,8 @@ cephfs_data: cephfs_data # name of the data pool for a given filesystem
|
|||
cephfs_metadata: cephfs_metadata # name of the metadata pool for a given filesystem
|
||||
|
||||
cephfs_pools:
|
||||
- { name: "{{ cephfs_data }}", pgs: "" }
|
||||
- { name: "{{ cephfs_metadata }}", pgs: "" }
|
||||
- { name: "{{ cephfs_data }}", pgs: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}" }
|
||||
- { name: "{{ cephfs_metadata }}", pgs: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}" }
|
||||
|
||||
## OSD options
|
||||
#
|
||||
|
|
|
@ -21,15 +21,6 @@
|
|||
- ceph_rhcs_cdn_debian_repo == 'https://customername:customerpasswd@rhcs.download.redhat.com'
|
||||
- ceph_repository not in ['rhcs', 'dev', 'obs']
|
||||
|
||||
- name: make sure pg num is set for cephfs pools
|
||||
fail:
|
||||
msg: "You must set pg num for your cephfs pools, see the cephfs_pools variable."
|
||||
with_items: "{{ cephfs_pools }}"
|
||||
when:
|
||||
- groups.get(mds_group_name, []) | length > 0
|
||||
- mon_group_name in group_names
|
||||
- item.pgs == ''
|
||||
|
||||
- name: make sure journal_size configured
|
||||
debug:
|
||||
msg: "WARNING: journal_size is configured to {{ journal_size }}, which is less than 5GB. This is not recommended and can lead to severe issues."
|
||||
|
|
|
@ -39,7 +39,4 @@ openstack_cinder_pool:
|
|||
expected_num_objects: ""
|
||||
openstack_pools:
|
||||
- "{{ openstack_glance_pool }}"
|
||||
- "{{ openstack_cinder_pool }}"
|
||||
cephfs_pools:
|
||||
- { name: "{{ cephfs_data }}", pgs: "8" }
|
||||
- { name: "{{ cephfs_metadata }}", pgs: "8" }
|
||||
- "{{ openstack_cinder_pool }}"
|
|
@ -21,7 +21,4 @@ ceph_conf_overrides:
|
|||
osd_pool_default_size: 1
|
||||
devices:
|
||||
- /dev/sda
|
||||
- /dev/sdb
|
||||
cephfs_pools:
|
||||
- { name: "{{ cephfs_data }}", pgs: "8" }
|
||||
- { name: "{{ cephfs_metadata }}", pgs: "8" }
|
||||
- /dev/sdb
|
|
@ -40,7 +40,4 @@ openstack_cinder_pool:
|
|||
expected_num_objects: ""
|
||||
openstack_pools:
|
||||
- "{{ openstack_glance_pool }}"
|
||||
- "{{ openstack_cinder_pool }}"
|
||||
cephfs_pools:
|
||||
- { name: "{{ cephfs_data }}", pgs: "8" }
|
||||
- { name: "{{ cephfs_metadata }}", pgs: "8" }
|
||||
- "{{ openstack_cinder_pool }}"
|
|
@ -27,7 +27,4 @@ nfs_ganesha_stable: true
|
|||
nfs_ganesha_stable_branch: V2.5-stable
|
||||
nfs_ganesha_stable_deb_repo: "{{ ceph_mirror }}/nfs-ganesha/deb-{{ nfs_ganesha_stable_branch }}/{{ ceph_stable_release }}"
|
||||
nfs_ganesha_dev: false
|
||||
nfs_ganesha_flavor: "ceph_master"
|
||||
cephfs_pools:
|
||||
- { name: "{{ cephfs_data }}", pgs: "8" }
|
||||
- { name: "{{ cephfs_metadata }}", pgs: "8" }
|
||||
nfs_ganesha_flavor: "ceph_master"
|
Loading…
Reference in New Issue