Fail validation if pacemaker service is not active
Pacemaker-status validation always reports success regardless
of the actual status of the service.
Add a task to fail validation when pacemaker service is found
inactive/failed
Closes-Bug: #1940519
Signed-off-by: Yadnesh Kulkarni <ykulkarn@redhat.com>
Change-Id: Id8d99321c870aee70f0e177b1b633654a04c8402
(cherry picked from commit 2a7c43df4a
)
This commit is contained in:
parent
8365aa780a
commit
d6f3a5c742
|
@ -9,6 +9,8 @@
|
||||||
A failed status post-deployment indicates something is not configured
|
A failed status post-deployment indicates something is not configured
|
||||||
correctly. This should also be run before upgrade as the process will
|
correctly. This should also be run before upgrade as the process will
|
||||||
likely fail with a cluster that's not completely healthy.
|
likely fail with a cluster that's not completely healthy.
|
||||||
|
|
||||||
|
This validation fails if pacemaker service is found failed or inactive.
|
||||||
groups:
|
groups:
|
||||||
- post-deployment
|
- post-deployment
|
||||||
roles:
|
roles:
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Check pacemaker service is inactive or failed
|
||||||
|
fail:
|
||||||
|
msg: "Pacemaker service found {{ check_service.stdout.split('=')[-1] }}"
|
||||||
|
when: check_service.stdout != 'ActiveState=active'
|
||||||
|
|
||||||
- when: "check_service.stdout == 'ActiveState=active'"
|
- when: "check_service.stdout == 'ActiveState=active'"
|
||||||
block:
|
block:
|
||||||
- name: Get pacemaker status
|
- name: Get pacemaker status
|
||||||
|
|
|
@ -7,5 +7,7 @@ metadata:
|
||||||
A failed status post-deployment indicates something is not configured
|
A failed status post-deployment indicates something is not configured
|
||||||
correctly. This should also be run before upgrade as the process will
|
correctly. This should also be run before upgrade as the process will
|
||||||
likely fail with a cluster that's not completely healthy.
|
likely fail with a cluster that's not completely healthy.
|
||||||
|
|
||||||
|
This validation fails if pacemaker service is found failed or inactive.
|
||||||
groups:
|
groups:
|
||||||
- post-deployment
|
- post-deployment
|
||||||
|
|
Loading…
Reference in New Issue