mirror of https://github.com/ceph/ceph-ansible.git
Customize pools min_size
Signed-off-by: Radu Toader <radu.m.toader@gmail.com>pull/3682/head
parent
2048255f61
commit
b8d580b3f4
|
@ -352,8 +352,8 @@ dummy:
|
||||||
#cephfs_metadata: cephfs_metadata # name of the metadata pool for a given filesystem
|
#cephfs_metadata: cephfs_metadata # name of the metadata pool for a given filesystem
|
||||||
|
|
||||||
#cephfs_pools:
|
#cephfs_pools:
|
||||||
# - { name: "{{ cephfs_data }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}" }
|
# - { name: "{{ cephfs_data }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}", min_size: "{{ osd_pool_default_size }}" }
|
||||||
# - { name: "{{ cephfs_metadata }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}" }
|
# - { name: "{{ cephfs_metadata }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}", min_size: "{{ osd_pool_default_size }}" }
|
||||||
|
|
||||||
## OSD options
|
## OSD options
|
||||||
#
|
#
|
||||||
|
@ -583,6 +583,7 @@ dummy:
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_cinder_pool:
|
#openstack_cinder_pool:
|
||||||
# name: "volumes"
|
# name: "volumes"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -593,6 +594,7 @@ dummy:
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_nova_pool:
|
#openstack_nova_pool:
|
||||||
# name: "vms"
|
# name: "vms"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -603,6 +605,7 @@ dummy:
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_cinder_backup_pool:
|
#openstack_cinder_backup_pool:
|
||||||
# name: "backups"
|
# name: "backups"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -613,6 +616,7 @@ dummy:
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_gnocchi_pool:
|
#openstack_gnocchi_pool:
|
||||||
# name: "metrics"
|
# name: "metrics"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -623,6 +627,7 @@ dummy:
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_cephfs_data_pool:
|
#openstack_cephfs_data_pool:
|
||||||
# name: "manila_data"
|
# name: "manila_data"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -633,6 +638,7 @@ dummy:
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_cephfs_metadata_pool:
|
#openstack_cephfs_metadata_pool:
|
||||||
# name: "manila_metadata"
|
# name: "manila_metadata"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -643,6 +649,7 @@ dummy:
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
|
|
||||||
#openstack_pools:
|
#openstack_pools:
|
||||||
# - "{{ openstack_glance_pool }}"
|
# - "{{ openstack_glance_pool }}"
|
||||||
|
|
|
@ -28,6 +28,7 @@ dummy:
|
||||||
# erasure_profile: ""
|
# erasure_profile: ""
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#test2:
|
#test2:
|
||||||
# name: "test2"
|
# name: "test2"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -38,6 +39,7 @@ dummy:
|
||||||
# erasure_profile: ""
|
# erasure_profile: ""
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#pools:
|
#pools:
|
||||||
# - "{{ test }}"
|
# - "{{ test }}"
|
||||||
# - "{{ test2 }}"
|
# - "{{ test2 }}"
|
||||||
|
|
|
@ -352,8 +352,8 @@ ceph_rhcs_version: 3
|
||||||
#cephfs_metadata: cephfs_metadata # name of the metadata pool for a given filesystem
|
#cephfs_metadata: cephfs_metadata # name of the metadata pool for a given filesystem
|
||||||
|
|
||||||
#cephfs_pools:
|
#cephfs_pools:
|
||||||
# - { name: "{{ cephfs_data }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}" }
|
# - { name: "{{ cephfs_data }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}",min_size: "{{ osd_pool_default_min_size }}" }
|
||||||
# - { name: "{{ cephfs_metadata }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}" }
|
# - { name: "{{ cephfs_metadata }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}", min_size: "{{ osd_pool_default_min_size }}" }
|
||||||
|
|
||||||
## OSD options
|
## OSD options
|
||||||
#
|
#
|
||||||
|
@ -583,6 +583,7 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/"
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_cinder_pool:
|
#openstack_cinder_pool:
|
||||||
# name: "volumes"
|
# name: "volumes"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -593,6 +594,7 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/"
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_nova_pool:
|
#openstack_nova_pool:
|
||||||
# name: "vms"
|
# name: "vms"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -603,6 +605,7 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/"
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_cinder_backup_pool:
|
#openstack_cinder_backup_pool:
|
||||||
# name: "backups"
|
# name: "backups"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -613,6 +616,7 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/"
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_gnocchi_pool:
|
#openstack_gnocchi_pool:
|
||||||
# name: "metrics"
|
# name: "metrics"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -623,6 +627,7 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/"
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_cephfs_data_pool:
|
#openstack_cephfs_data_pool:
|
||||||
# name: "manila_data"
|
# name: "manila_data"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -633,6 +638,7 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/"
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
#openstack_cephfs_metadata_pool:
|
#openstack_cephfs_metadata_pool:
|
||||||
# name: "manila_metadata"
|
# name: "manila_metadata"
|
||||||
# pg_num: "{{ osd_pool_default_pg_num }}"
|
# pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -643,6 +649,7 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/"
|
||||||
# expected_num_objects: ""
|
# expected_num_objects: ""
|
||||||
# application: "rbd"
|
# application: "rbd"
|
||||||
# size: "{{ osd_pool_default_size }}"
|
# size: "{{ osd_pool_default_size }}"
|
||||||
|
# min_size: "{{ osd_pool_default_size }}"
|
||||||
|
|
||||||
#openstack_pools:
|
#openstack_pools:
|
||||||
# - "{{ openstack_glance_pool }}"
|
# - "{{ openstack_glance_pool }}"
|
||||||
|
|
|
@ -20,6 +20,7 @@ test:
|
||||||
erasure_profile: ""
|
erasure_profile: ""
|
||||||
expected_num_objects: ""
|
expected_num_objects: ""
|
||||||
size: "{{ osd_pool_default_size }}"
|
size: "{{ osd_pool_default_size }}"
|
||||||
|
min_size: "{{ osd_pool_default_min_size }}"
|
||||||
test2:
|
test2:
|
||||||
name: "test2"
|
name: "test2"
|
||||||
pg_num: "{{ osd_pool_default_pg_num }}"
|
pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -30,6 +31,7 @@ test2:
|
||||||
erasure_profile: ""
|
erasure_profile: ""
|
||||||
expected_num_objects: ""
|
expected_num_objects: ""
|
||||||
size: "{{ osd_pool_default_size }}"
|
size: "{{ osd_pool_default_size }}"
|
||||||
|
min_size: "{{ osd_pool_default_min_size }}"
|
||||||
pools:
|
pools:
|
||||||
- "{{ test }}"
|
- "{{ test }}"
|
||||||
- "{{ test2 }}"
|
- "{{ test2 }}"
|
||||||
|
|
|
@ -113,6 +113,17 @@
|
||||||
- pools | length > 0
|
- pools | length > 0
|
||||||
- item.size | default(osd_pool_default_size) != ceph_osd_pool_default_size
|
- item.size | default(osd_pool_default_size) != ceph_osd_pool_default_size
|
||||||
|
|
||||||
|
- name: customize pool min_size
|
||||||
|
command: >
|
||||||
|
{{ docker_exec_cmd | default('') }} ceph --cluster {{ cluster }}
|
||||||
|
osd pool set {{ item.name }} min_size {{ item.min_size | default(osd_pool_default_min_size) }}
|
||||||
|
with_items: "{{ pools | unique }}"
|
||||||
|
delegate_to: "{{ delegated_node }}"
|
||||||
|
changed_when: false
|
||||||
|
when:
|
||||||
|
- pools | length > 0
|
||||||
|
- item.min_size | default(osd_pool_default_min_size) != ceph_osd_pool_default_min_size
|
||||||
|
|
||||||
- name: assign application to pool(s)
|
- name: assign application to pool(s)
|
||||||
command: "{{ docker_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd pool application enable {{ item.name }} {{ item.application }}"
|
command: "{{ docker_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd pool application enable {{ item.name }} {{ item.application }}"
|
||||||
with_items: "{{ pools | unique }}"
|
with_items: "{{ pools | unique }}"
|
||||||
|
@ -121,7 +132,6 @@
|
||||||
when:
|
when:
|
||||||
- item.application is defined
|
- item.application is defined
|
||||||
|
|
||||||
|
|
||||||
- name: get client cephx keys
|
- name: get client cephx keys
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item.source }}"
|
dest: "{{ item.source }}"
|
||||||
|
|
|
@ -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_metadata: cephfs_metadata # name of the metadata pool for a given filesystem
|
||||||
|
|
||||||
cephfs_pools:
|
cephfs_pools:
|
||||||
- { name: "{{ cephfs_data }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}" }
|
- { name: "{{ cephfs_data }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}", min_size: "{{ osd_pool_default_min_size }}"}
|
||||||
- { name: "{{ cephfs_metadata }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}" }
|
- { name: "{{ cephfs_metadata }}", pgs: "{{ osd_pool_default_pg_num }}", size: "{{ osd_pool_default_size }}", min_size: "{{ osd_pool_default_min_size }}"}
|
||||||
|
|
||||||
## OSD options
|
## OSD options
|
||||||
#
|
#
|
||||||
|
@ -575,6 +575,7 @@ openstack_glance_pool:
|
||||||
expected_num_objects: ""
|
expected_num_objects: ""
|
||||||
application: "rbd"
|
application: "rbd"
|
||||||
size: "{{ osd_pool_default_size }}"
|
size: "{{ osd_pool_default_size }}"
|
||||||
|
min_size: "{{ osd_pool_default_min_size }}"
|
||||||
openstack_cinder_pool:
|
openstack_cinder_pool:
|
||||||
name: "volumes"
|
name: "volumes"
|
||||||
pg_num: "{{ osd_pool_default_pg_num }}"
|
pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -585,6 +586,7 @@ openstack_cinder_pool:
|
||||||
expected_num_objects: ""
|
expected_num_objects: ""
|
||||||
application: "rbd"
|
application: "rbd"
|
||||||
size: "{{ osd_pool_default_size }}"
|
size: "{{ osd_pool_default_size }}"
|
||||||
|
min_size: "{{ osd_pool_default_min_size }}"
|
||||||
openstack_nova_pool:
|
openstack_nova_pool:
|
||||||
name: "vms"
|
name: "vms"
|
||||||
pg_num: "{{ osd_pool_default_pg_num }}"
|
pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -595,6 +597,7 @@ openstack_nova_pool:
|
||||||
expected_num_objects: ""
|
expected_num_objects: ""
|
||||||
application: "rbd"
|
application: "rbd"
|
||||||
size: "{{ osd_pool_default_size }}"
|
size: "{{ osd_pool_default_size }}"
|
||||||
|
min_size: "{{ osd_pool_default_min_size }}"
|
||||||
openstack_cinder_backup_pool:
|
openstack_cinder_backup_pool:
|
||||||
name: "backups"
|
name: "backups"
|
||||||
pg_num: "{{ osd_pool_default_pg_num }}"
|
pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -605,6 +608,7 @@ openstack_cinder_backup_pool:
|
||||||
expected_num_objects: ""
|
expected_num_objects: ""
|
||||||
application: "rbd"
|
application: "rbd"
|
||||||
size: "{{ osd_pool_default_size }}"
|
size: "{{ osd_pool_default_size }}"
|
||||||
|
min_size: "{{ osd_pool_default_min_size }}"
|
||||||
openstack_gnocchi_pool:
|
openstack_gnocchi_pool:
|
||||||
name: "metrics"
|
name: "metrics"
|
||||||
pg_num: "{{ osd_pool_default_pg_num }}"
|
pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -615,6 +619,7 @@ openstack_gnocchi_pool:
|
||||||
expected_num_objects: ""
|
expected_num_objects: ""
|
||||||
application: "rbd"
|
application: "rbd"
|
||||||
size: "{{ osd_pool_default_size }}"
|
size: "{{ osd_pool_default_size }}"
|
||||||
|
min_size: "{{ osd_pool_default_min_size }}"
|
||||||
openstack_cephfs_data_pool:
|
openstack_cephfs_data_pool:
|
||||||
name: "manila_data"
|
name: "manila_data"
|
||||||
pg_num: "{{ osd_pool_default_pg_num }}"
|
pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -625,6 +630,7 @@ openstack_cephfs_data_pool:
|
||||||
expected_num_objects: ""
|
expected_num_objects: ""
|
||||||
application: "rbd"
|
application: "rbd"
|
||||||
size: "{{ osd_pool_default_size }}"
|
size: "{{ osd_pool_default_size }}"
|
||||||
|
min_size: "{{ osd_pool_default_min_size }}"
|
||||||
openstack_cephfs_metadata_pool:
|
openstack_cephfs_metadata_pool:
|
||||||
name: "manila_metadata"
|
name: "manila_metadata"
|
||||||
pg_num: "{{ osd_pool_default_pg_num }}"
|
pg_num: "{{ osd_pool_default_pg_num }}"
|
||||||
|
@ -635,6 +641,7 @@ openstack_cephfs_metadata_pool:
|
||||||
expected_num_objects: ""
|
expected_num_objects: ""
|
||||||
application: "rbd"
|
application: "rbd"
|
||||||
size: "{{ osd_pool_default_size }}"
|
size: "{{ osd_pool_default_size }}"
|
||||||
|
min_size: "{{ osd_pool_default_min_size }}"
|
||||||
|
|
||||||
openstack_pools:
|
openstack_pools:
|
||||||
- "{{ openstack_glance_pool }}"
|
- "{{ openstack_glance_pool }}"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
---
|
---
|
||||||
ceph_osd_pool_default_size: 3
|
ceph_osd_pool_default_size: 3
|
||||||
|
ceph_osd_pool_default_min_size: 0
|
||||||
ceph_osd_pool_default_pg_num: 8
|
ceph_osd_pool_default_pg_num: 8
|
||||||
|
|
|
@ -245,6 +245,10 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
osd_pool_default_size: "{{ ceph_conf_overrides.get('global', {}).get('osd_pool_default_size', ceph_osd_pool_default_size) }}"
|
osd_pool_default_size: "{{ ceph_conf_overrides.get('global', {}).get('osd_pool_default_size', ceph_osd_pool_default_size) }}"
|
||||||
|
|
||||||
|
- name: set_fact osd_pool_default_min_size
|
||||||
|
set_fact:
|
||||||
|
osd_pool_default_min_size: "{{ ceph_conf_overrides.get('global', {}).get('osd_pool_default_min_size', ceph_osd_pool_default_min_size) }}"
|
||||||
|
|
||||||
- name: import_tasks set_monitor_address.yml
|
- name: import_tasks set_monitor_address.yml
|
||||||
import_tasks: set_monitor_address.yml
|
import_tasks: set_monitor_address.yml
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,14 @@
|
||||||
when:
|
when:
|
||||||
- item.size | default(osd_pool_default_size) != ceph_osd_pool_default_size
|
- item.size | default(osd_pool_default_size) != ceph_osd_pool_default_size
|
||||||
|
|
||||||
|
- name: customize pool min_size
|
||||||
|
command: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} osd pool set {{ item.name }} min_size {{ item.min_size | default(osd_pool_default_min_size) }}"
|
||||||
|
with_items: "{{ cephfs_pools | unique }}"
|
||||||
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
|
changed_when: false
|
||||||
|
when:
|
||||||
|
- item.min_size | default(osd_pool_default_min_size) != ceph_osd_pool_default_min_size
|
||||||
|
|
||||||
- name: check if ceph filesystem already exists
|
- name: check if ceph filesystem already exists
|
||||||
command: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} fs get {{ cephfs }}"
|
command: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} fs get {{ cephfs }}"
|
||||||
register: check_existing_cephfs
|
register: check_existing_cephfs
|
||||||
|
|
|
@ -52,6 +52,16 @@
|
||||||
when:
|
when:
|
||||||
- item.size | default(osd_pool_default_size) != ceph_osd_pool_default_size
|
- item.size | default(osd_pool_default_size) != ceph_osd_pool_default_size
|
||||||
|
|
||||||
|
- name: customize pool min_size
|
||||||
|
command: >
|
||||||
|
{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }}
|
||||||
|
osd pool set {{ item.name }} min_size {{ item.min_size | default(osd_pool_default_min_size) }}
|
||||||
|
with_items: "{{ openstack_pools | unique }}"
|
||||||
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
|
changed_when: false
|
||||||
|
when:
|
||||||
|
- item.min_size | default(osd_pool_default_min_size) != ceph_osd_pool_default_min_size
|
||||||
|
|
||||||
- name: assign application to pool(s)
|
- name: assign application to pool(s)
|
||||||
command: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} osd pool application enable {{ item.name }} {{ item.application }}"
|
command: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} osd pool application enable {{ item.name }} {{ item.application }}"
|
||||||
with_items: "{{ openstack_pools | unique }}"
|
with_items: "{{ openstack_pools | unique }}"
|
||||||
|
|
Loading…
Reference in New Issue