Check for Ceph status in post-deployment
Emits a Warning: message if Ceph is in HEALTH_WARN state Change-Id: Ib6840ed656b8f65defe2f05733cb3cc10da48aca
This commit is contained in:
parent
311411122b
commit
6496b30ad2
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds a ceph-health check which prints a warning message if Ceph cluster
|
||||
is in HEALTH_WARN state at the end of the Overcloud deployment
|
29
validations/ceph-health.yaml
Normal file
29
validations/ceph-health.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
- hosts: controller
|
||||
vars:
|
||||
metadata:
|
||||
name: Check the status of the ceph cluster
|
||||
description: >
|
||||
Uses `ceph health` to check if cluster is in HEALTH_WARN state
|
||||
and prints a debug message.
|
||||
|
||||
groups:
|
||||
- post-deployment
|
||||
tasks:
|
||||
- name: Check if ceph_mon is deployed
|
||||
become: true
|
||||
shell: hiera -c /etc/puppet/hiera.yaml enabled_services | egrep -sq ceph_mon
|
||||
ignore_errors: true
|
||||
register: ceph_mon_enabled
|
||||
- name: Get ceph health
|
||||
become: true
|
||||
shell: ceph health | awk '{print $1}'
|
||||
register: ceph_health
|
||||
when:
|
||||
- ceph_mon_enabled|succeeded
|
||||
- name: Check ceph health
|
||||
warn:
|
||||
msg: Ceph is in {{ ceph_health.stdout }} state.
|
||||
when:
|
||||
- ceph_mon_enabled|succeeded
|
||||
- ceph_health.stdout == 'HEALTH_WARN'
|
Loading…
x
Reference in New Issue
Block a user