Skip to content

Commit 17a08ad

Browse files
fultonjopenshift-merge-bot[bot]
authored andcommitted
Log Ceph health and do not fail on HEALTH_WARN
The Ceph Upgrade tasks in the cifmw_cephadm role will fail before the upgrade starts if the health status is warn or error. This patch changes it so that the upgrade only fails if the cluster is in health error. We have had the job fail in CI but we do not know why. The task should log the Ceph health before starting the upgrade so that CI results will give the job owner more insight into why the job failed. Signed-off-by: John Fulton <[email protected]>
1 parent ff9f827 commit 17a08ad

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

roles/cifmw_cephadm/tasks/ceph_upgrade.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@
1818
ansible.builtin.set_fact:
1919
ceph_health: "{{ ceph.stdout | from_json }}"
2020

21-
- name: Fail if health is HEALTH_WARN || HEALTH_ERR
21+
- name: Log ceph health for debug purposes
22+
ansible.builtin.debug:
23+
var: ceph_health
24+
25+
- name: Fail if health is HEALTH_ERR
2226
ansible.builtin.fail:
2327
msg: Ceph is in {{ ceph_health.health.status }} state.
2428
when:
25-
- ceph_health.health.status == 'HEALTH_WARN' or
26-
ceph_health.health.status == 'HEALTH_ERR'
29+
- ceph_health.health.status == 'HEALTH_ERR'
2730

2831
- name: Build container image target
2932
ansible.builtin.set_fact:

0 commit comments

Comments
 (0)