Use custom Ceph cluster name in validations

Also adds scenario004 as check and gate job for changes to the
Ceph roles.

Change-Id: Ic895c81f11b61e7310b7ca17fad4693c4eea0418
Closes-Bug: 1838556
This commit is contained in:
Giulio Fidente 2019-08-06 12:59:34 +02:00
parent e19638c93e
commit dd1c4dd16a
2 changed files with 14 additions and 2 deletions

View File

@ -29,9 +29,15 @@
- ceph_mon_enabled is succeeded
- ceph_mon_container is succeeded
block:
- name: Set ceph cluster name
become: true
shell: find /etc/ceph -name '*.conf' -prune -print -quit | xargs basename -s '.conf'
register: ceph_cluster_name
changed_when: False
- name: Get ceph health
become: true
shell: "{{ container_cli }} exec {{ ceph_mon_container.stdout }} ceph health | awk '{print $1}'"
shell: "{{ container_cli }} exec {{ ceph_mon_container.stdout }} ceph --cluster {{ ceph_cluster_name.stdout }} health | awk '{print $1}'"
register: ceph_health
- name: Check ceph health
@ -59,7 +65,7 @@
- name: Get OSD stat percentage
become: true
shell: "{{ container_cli }} exec {{ ceph_mon_container.stdout }} ceph osd stat -f json | jq '{{ jq_osd_percentage_filter }}'"
shell: "{{ container_cli }} exec {{ ceph_mon_container.stdout }} ceph --cluster {{ ceph_cluster_name.stdout }} 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

View File

@ -10,6 +10,12 @@
check:
jobs:
- openstack-tox-lower-constraints
- tripleo-ci-centos-7-scenario004-standalone:
files:
- ^roles/ceph.*$
gate:
jobs:
- openstack-tox-lower-constraints
- tripleo-ci-centos-7-scenario004-standalone:
files:
- ^roles/ceph.*$