Merge pull request #1995 from ceph/remove-rbd-check

jewel: remove rbd check
pull/2001/head
Sébastien Han 2017-10-05 15:31:48 +02:00 committed by GitHub
commit 164c77acd1
5 changed files with 0 additions and 94 deletions

View File

@ -42,13 +42,6 @@
- openstack_config - openstack_config
- inventory_hostname == groups[mon_group_name] | last - 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 - name: include create_mds_filesystems.yml
include: create_mds_filesystems.yml include: create_mds_filesystems.yml
when: when:

View File

@ -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

View File

@ -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

View File

@ -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 }}"

View File

@ -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 }}"