Merge "Revert "Improve Ceph health checks to work with custom cluster names""

This commit is contained in:
Zuul 2019-08-06 20:22:00 +00:00 committed by Gerrit Code Review
commit e538731d98
1 changed files with 2 additions and 9 deletions

View File

@ -29,16 +29,9 @@
- ceph_mon_enabled is succeeded
- ceph_mon_container is succeeded
block:
- name: Set ceph cluster name
become: true
shell: find /etc/ceph -name '*.conf' -exec basename -s .conf {} \; 2>/dev/null | head -n1
ignore_errors: true
register: ceph_cluster_name
changed_when: False
- name: Get ceph health
become: true
shell: "{{ container_cli }} exec {{ ceph_mon_container.stdout }} ceph --cluster {{ ceph_cluster_name }} health | awk '{print $1}'"
shell: "{{ container_cli }} exec {{ ceph_mon_container.stdout }} ceph health | awk '{print $1}'"
register: ceph_health
- name: Check ceph health
@ -66,7 +59,7 @@
- name: Get OSD stat percentage
become: true
shell: "{{ container_cli }} exec {{ ceph_mon_container.stdout }} ceph --cluster {{ ceph_cluster_name }} osd stat -f json | jq '{{ jq_osd_percentage_filter }}'"
shell: "{{ container_cli }} exec {{ ceph_mon_container.stdout }} ceph osd stat -f json | jq '{{ jq_osd_percentage_filter }}'"
register: ceph_osd_in_percentage
- name: Fail if there is an unacceptable percentage of in OSDs