diff --git a/roles/ceph-mon/tasks/main.yml b/roles/ceph-mon/tasks/main.yml index 912e0e0e5..36b74b7d1 100644 --- a/roles/ceph-mon/tasks/main.yml +++ b/roles/ceph-mon/tasks/main.yml @@ -42,13 +42,6 @@ - openstack_config - inventory_hostname == groups[mon_group_name] | last -# CEPH creates the rbd pool during the ceph cluster initialization in -# releases prior to luminous. If the rbd_pool.yml playbook is called too -# early, the rbd pool does not exist yet. -- name: include rbd_pool.yml - include: rbd_pool.yml - when: ceph_release_num.{{ ceph_release }} < ceph_release_num.luminous - - name: include create_mds_filesystems.yml include: create_mds_filesystems.yml when: diff --git a/roles/ceph-mon/tasks/rbd_pool.yml b/roles/ceph-mon/tasks/rbd_pool.yml deleted file mode 100644 index 3170ba240..000000000 --- a/roles/ceph-mon/tasks/rbd_pool.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -- name: test if rbd exists - shell: | - "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} osd pool ls | grep -sq rbd" - changed_when: false - failed_when: false - run_once: true - check_mode: true - register: rbd_pool_exist - -- name: include rbd_pool_df.yml - include: rbd_pool_df.yml - when: rbd_pool_exist.rc == 0 - -- name: include rbd_pool_pgs.yml - include: rbd_pool_pgs.yml - when: - - rbd_pool_exist.rc == 0 - - ceph_conf_overrides.get('global', {}).get('osd_pool_default_pg_num', False) != False - -- name: include rbd_pool_size.yml - include: rbd_pool_size.yml - when: - - rbd_pool_exist.rc == 0 - - ceph_conf_overrides.get('global', {}).get('osd_pool_default_pg_num', False) != False diff --git a/roles/ceph-mon/tasks/rbd_pool_df.yml b/roles/ceph-mon/tasks/rbd_pool_df.yml deleted file mode 100644 index c24f9df5d..000000000 --- a/roles/ceph-mon/tasks/rbd_pool_df.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: verify that rbd pool exist - fail: - msg: "rbd pool does not exist in rbd_pool_df" - when: rbd_pool_exist.rc == 0 - -- name: check rbd pool usage - shell: | - "{{ docker_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} df | awk '/rbd/ {print $3}'" - changed_when: false - failed_when: false - check_mode: true - run_once: true - register: rbd_pool_df diff --git a/roles/ceph-mon/tasks/rbd_pool_pgs.yml b/roles/ceph-mon/tasks/rbd_pool_pgs.yml deleted file mode 100644 index fa404e4c1..000000000 --- a/roles/ceph-mon/tasks/rbd_pool_pgs.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -- name: verify that rbd pool exist - fail: - msg: "rbd pool does not exist in rbd_pool_pgs" - when: rbd_pool_exist.rc == 0 - -- name: check pg num for rbd pool - shell: | - "{{ docker_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool get rbd pg_num | awk '{print $2}'" - changed_when: false - failed_when: false - check_mode: true - run_once: true - register: rbd_pool_pgs - -- name: destroy and recreate rbd pool if osd_pool_default_pg_num is not honoured - shell: | - "{{ docker_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool delete rbd rbd --yes-i-really-really-mean-it" - "{{ docker_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool create rbd {{ ceph_conf_overrides.global.osd_pool_default_pg_num }}" - changed_when: false - failed_when: false - run_once: true - when: - - rbd_pool_df.stdout == "0" - - rbd_pool_pgs.stdout != "{{ ceph_conf_overrides.global.osd_pool_default_pg_num }}" diff --git a/roles/ceph-mon/tasks/rbd_pool_size.yml b/roles/ceph-mon/tasks/rbd_pool_size.yml deleted file mode 100644 index ca16e3553..000000000 --- a/roles/ceph-mon/tasks/rbd_pool_size.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- name: verify that rbd pool exist - fail: - msg: "rbd pool does not exist in rbd_pool_size" - when: rbd_pool_exist.rc == 0 - -- name: check size for rbd pool - shell: | - "{{ docker_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool get rbd size | awk '{print $2}'" - changed_when: false - failed_when: false - check_mode: true - run_once: true - register: rbd_pool_size - -- name: change rbd pool size if osd_pool_default_size is not honoured - command: "{{ docker_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool set rbd size {{ ceph_conf_overrides.global.osd_pool_default_size }}" - changed_when: false - failed_when: false - run_once: true - when: - - rbd_pool_df.stdout == "0" - - rbd_pool_size.stdout != "{{ ceph_conf_overrides.global.osd_pool_default_size }}"