Bug 2000125

Summary: 'pacemaker-status' validation reports incorrect status
Product: Red Hat OpenStack Reporter: Yadnesh Kulkarni <ykulkarn>
Component: openstack-tripleo-validationsAssignee: Yadnesh Kulkarni <ykulkarn>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: gchamoul, jjoyce, jpodivin, jschluet, slinaber, tvignaud
Target Milestone: z8Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-validations-11.3.2-1.20210909093305.4db92ba.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-24 11:01:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version: stable/train
Embargoed:

Description Yadnesh Kulkarni 2021-09-01 12:58:49 UTC
Description
===========
'pacemaker-status' validation always reports PASSED regardless of the actual status of pacemaker service

Steps to reproduce
==================
Stop pacemaker service on ctrl node and run validation
~~~
[root@controller-0 ~]# systemctl status pacemaker                                                                                                                                                                                                                                         
● pacemaker.service - Pacemaker High Availability Cluster Manager
   Loaded: loaded (/usr/lib/systemd/system/pacemaker.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Wed 2021-09-01 12:57:12 UTC; 6s ago
     Docs: man:pacemakerd
           https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html
  Process: 23625 ExecStart=/usr/sbin/pacemakerd -f (code=exited, status=0/SUCCESS)
 Main PID: 23625 (code=exited, status=0/SUCCESS)

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --validation pacemaker-status
Running Validations without Overcloud settings.
+--------------------------------------+------------------+--------+------------+----------------+-------------------+-------------+
|                 UUID                 |   Validations    | Status | Host_Group | Status_by_Host | Unreachable_Hosts |   Duration  |
+--------------------------------------+------------------+--------+------------+----------------+-------------------+-------------+
| e5cf056f-f411-4a6c-902a-862f2af44b28 | pacemaker-status | PASSED | Controller |  controller-0  |                   | 0:00:00.715 |
+--------------------------------------+------------------+--------+------------+----------------+-------------------+-------------+
(undercloud) [stack@undercloud-0 ~]$ 
~~~

Expected result
===============
Validation should've been reported as failed

Actual result
=============
Validation was reported as passed, meaning pacemaker service is active

Environment
===========
Red Hat OpenStack Platform release 16.1.6 GA (Train)

Logs & Configs
==============
Ansible reports the service as inactive in validation logs
~~~
                            "delta": "0:00:00.014623",
                            "end": "2021-09-01 12:57:46.081054",
                            "invocation": {
                                "module_args": {
                                    "_raw_params": "/usr/bin/systemctl show pacemaker --property ActiveState",
                                    "_uses_shell": false,
                                    "argv": null,
                                    "chdir": null,
                                    "creates": null,
                                    "executable": null,
                                    "removes": null,
                                    "stdin": null,
                                    "stdin_add_newline": true,
                                    "strip_empty_ends": true,
                                    "warn": true
                                }
                            },
                            "ok": true,
                            "rc": 0,
                            "start": "2021-09-01 12:57:46.066431",
                            "stderr": "",
                            "stderr_lines": [],
                            "stdout": "ActiveState=inactive",   <<<<<<<<<<
                            "stdout_lines": [
                                "ActiveState=inactive"
                            ]
                        }
                    },
~~~

Comment 8 Jiri Podivin 2022-02-16 14:53:49 UTC
Manually verified on 16.02.2022 with RHOS 16.1.8, puddle RHOS-16.1-RHEL-8-20220210.n.1.

Comment 13 errata-xmlrpc 2022-03-24 11:01:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1.8 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:0986