Validation stonith device exists in OpenStack Platform HA cluster
Change-Id: I1ccb5ef2225fe2be15785083210921c44b8f00ca
This commit is contained in:
parent
236ce74c37
commit
50c33f6da5
36
validations/stonith-exists.yaml
Normal file
36
validations/stonith-exists.yaml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
- name: Validate stonith devices
|
||||
hosts: controller
|
||||
vars:
|
||||
metadata:
|
||||
name: stonith-exists
|
||||
description: >
|
||||
Verify that stonith devices are configured for your OpenStack Platform HA cluster.
|
||||
We don't configure stonith device with TripleO Installer. Because the hardware
|
||||
configuration may be differ in each environment and requires different fence agents.
|
||||
How to configure fencing please read https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/paged/director-installation-and-usage/86-fencing-the-controller-nodes
|
||||
groups:
|
||||
- post-deployment
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Check if we are in HA cluster environment
|
||||
register: pcs_cluster_status
|
||||
command: pcs cluster status
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
- name: Get all currently configured stonith devices
|
||||
when: "pcs_cluster_status.rc == 0"
|
||||
register: stonith_devices
|
||||
command: "pcs stonith"
|
||||
changed_when: false
|
||||
|
||||
- name: Verify the stonith device are configured
|
||||
fail:
|
||||
msg: "Stonith devices are not configured."
|
||||
when: >
|
||||
pcs_cluster_status.rc == 0
|
||||
and
|
||||
'NO stonith devices configured' in stonith_devices.stdout
|
||||
|
Loading…
Reference in New Issue
Block a user