Bug 1432097

Summary: pcs status nodes shows incomplete information when both standby and maintenance modes are set for a node
Product: Red Hat Enterprise Linux 8 Reporter: Miroslav Lisik <mlisik>
Component: pcsAssignee: Michal Pospisil <mpospisi>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: cfeist, cluster-maint, idevat, kmalyjur, mlisik, mmazoure, mpospisi, nhostako, omular, tojeline
Target Milestone: rcKeywords: Reopened, Triaged
Target Release: 8.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.10.9-1.el8 Doc Type: Bug Fix
Doc Text:
Cause: Node status command does not expect that nodes can be in maintenance and standby modes at the same time. Consequence: When a node is simultaneously in standby and maintence modes, the "pcs status nodes" command shows that node as if it was only in standby mode. Fix: Changing the logic that displays node status so that it supports any valid combination of modes for online nodes. Result: Node status command shows a correct status for nodes that are both in maintenance and standby modes.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 17:33:12 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:
Embargoed:

Description Miroslav Lisik 2017-03-14 14:14:51 UTC
Description of problem:

When maintenance and standby modes are set for a node at the same time, the node status shows only standby mode for that node.

Version-Release number of selected component (if applicable):
pcs-0.9.156-2.el7.x86_64

How reproducible:


Steps to Reproduce:
1. Have a cluster.

[root@virt-275 ~]# pcs status
Cluster name: STSRHTS4761
Stack: corosync
Current DC: virt-277 (version 1.1.16-2.el7-94ff4df) - partition with quorum
Last updated: Tue Mar 14 15:09:19 2017
Last change: Tue Mar 14 15:09:13 2017 by root via cibadmin on virt-275

3 nodes configured
4 resources configured

Online: [ virt-275 virt-276 virt-277 ]

Full list of resources:

 fence-virt-277 (stonith:fence_xvm):    Started virt-276
 fence-virt-276 (stonith:fence_xvm):    Started virt-277
 fence-virt-275 (stonith:fence_xvm):    Started virt-275
 d-01   (ocf::pacemaker:Dummy): Started virt-275

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/enabled


2. Set a node into maintenance and standby modes.

[root@virt-275 ~]# pcs node maintenance virt-275
[root@virt-275 ~]# pcs node standby virt-275

3. See the output of 'pcs status nodes' command.

[root@virt-275 ~]# pcs status nodes
Pacemaker Nodes:
 Online: virt-276 virt-277
 Standby: virt-275
 Maintenance:
 Offline:
Pacemaker Remote Nodes:
 Online:
 Standby:
 Maintenance:
 Offline:


Actual results:

Status doesn't show node in maintenance mode.

Expected results:

The node status shows information that node is in both standby and maintenance modes.

Comment 5 RHEL Program Management 2021-01-15 07:32:51 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 9 Michal Pospisil 2021-07-26 11:38:42 UTC
Fix merged into upstream master: https://github.com/ClusterLabs/pcs/commit/f7cf1e5c3a4c3152393c4f03afa2ca818e48ab1c

ENVIRONMENT PREPARATION:
- any cluster (2 node cluster is used only for demonstration, it's not a hard requirement)

To test this fix, run commands:
# pcs status nodes
Pacemaker Nodes:
 Online: c3n1-el8.5 c3n2-el8.5
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:
Pacemaker Remote Nodes:
 Online:
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:
# pcs node standby
# pcs status nodes
Pacemaker Nodes:
 Online: c3n1-el8.5
 Standby: c3n2-el8.5
 Standby with resource(s) running:
 Maintenance:
 Offline:
Pacemaker Remote Nodes:
 Online:
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:
# pcs node maintenance
# pcs status nodes
Pacemaker Nodes:
 Online: c3n1-el8.5
 Standby: c3n2-el8.5
 Standby with resource(s) running:
 Maintenance: c3n2-el8.5
 Offline:
Pacemaker Remote Nodes:
 Online:
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:
# pcs node unstandby
# pcs status nodes
Pacemaker Nodes:
 Online: c3n1-el8.5
 Standby:
 Standby with resource(s) running:
 Maintenance: c3n2-el8.5
 Offline:
Pacemaker Remote Nodes:
 Online:
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:

Comment 11 Miroslav Lisik 2021-08-10 13:39:19 UTC
DevTestResults:

[root@r8-node-01 ~]# rpm -q pcs
pcs-0.10.9-1.el8.x86_64

[root@r8-node-01 ~]# pcs status nodes
Pacemaker Nodes:
 Online: r8-node-01 r8-node-02 r8-node-03
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:
Pacemaker Remote Nodes:
 Online:
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:
[root@r8-node-01 ~]# pcs node standby r8-node-03
[root@r8-node-01 ~]# pcs node maintenance r8-node-03
[root@r8-node-01 ~]# pcs status nodes
Pacemaker Nodes:
 Online: r8-node-01 r8-node-02
 Standby: r8-node-03
 Standby with resource(s) running:
 Maintenance: r8-node-03
 Offline:
Pacemaker Remote Nodes:
 Online:
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:

Comment 15 Michal Mazourek 2021-08-25 10:23:40 UTC
BEFORE:
=======

[root@virt-531 ~]# rpm -q pcs
pcs-0.10.8-1.el8.x86_64


## Setting node into maintenance and standby modes

[root@virt-531 ~]# pcs node maintenance virt-531
[root@virt-531 ~]# pcs node standby virt-531
[root@virt-531 ~]# pcs status nodes
Pacemaker Nodes:
 Online: virt-535
 Standby:
 Standby with resource(s) running: virt-531
 Maintenance:
 Offline:
Pacemaker Remote Nodes:
 Online:
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:
[root@virt-531 ~]# echo $?
0

> node is not shown in maintenance mode


AFTER:
======

[root@virt-131 ~]# rpm -q pcs
pcs-0.10.10-1.el8.x86_64


[root@virt-131 ~]# pcs status nodes
Pacemaker Nodes:
 Online: virt-131 virt-132
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:
Pacemaker Remote Nodes:
 Online:
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:


## Setting node into maintenance and standby modes

[root@virt-131 ~]# pcs node maintenance virt-131
[root@virt-131 ~]# pcs status nodes | grep "Pacemaker Nodes" -A 5
Pacemaker Nodes:
 Online: virt-132
 Standby:
 Standby with resource(s) running:
 Maintenance: virt-131
 Offline:

> OK

[root@virt-131 ~]# pcs node standby virt-131
[root@virt-131 ~]# pcs status nodes | grep "Pacemaker Nodes" -A 5
Pacemaker Nodes:
 Online: virt-132
 Standby: virt-131
 Standby with resource(s) running:
 Maintenance: virt-131
 Offline:

> OK: The node is shown in both, standby and maintenance mode

[root@virt-131 ~]# pcs node unmaintenance virt-131
[root@virt-131 ~]# pcs status nodes | grep "Pacemaker Nodes" -A 5
Pacemaker Nodes:
 Online: virt-132
 Standby: virt-131
 Standby with resource(s) running:
 Maintenance:
 Offline:

> OK

[root@virt-131 ~]# pcs node unstandby virt-131
[root@virt-131 ~]# pcs status nodes | grep "Pacemaker Nodes" -A 5
Pacemaker Nodes:
 Online: virt-131 virt-132
 Standby:
 Standby with resource(s) running:
 Maintenance:
 Offline:

> OK


## creating resources and setting node into maintenance and standby modes

[root@virt-131 ~]# pcs resource create d1 ocf:heartbeat:Dummy
[root@virt-131 ~]# pcs resource create d2 ocf:heartbeat:Dummy
[root@virt-131 ~]# pcs resource
  * d1	(ocf::heartbeat:Dummy):	 Started virt-131
  * d2	(ocf::heartbeat:Dummy):	 Started virt-132

[root@virt-131 ~]# pcs node maintenance virt-131
[root@virt-131 ~]# pcs status nodes | grep "Pacemaker Nodes" -A 5
Pacemaker Nodes:
 Online: virt-132
 Standby:
 Standby with resource(s) running:
 Maintenance: virt-131
 Offline:
[root@virt-131 ~]# pcs node standby virt-131
[root@virt-131 ~]# pcs status nodes | grep "Pacemaker Nodes" -A 5
Pacemaker Nodes:
 Online: virt-132
 Standby:
 Standby with resource(s) running: virt-131
 Maintenance: virt-131
 Offline:

> OK: The node is shown in both, maintenance and standby with resource(s) mode


Marking as VERIFIED in pcs-0.10.10-1.el8

Comment 17 errata-xmlrpc 2021-11-09 17:33:12 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 (Low: pcs security, bug fix, and enhancement update), 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/RHSA-2021:4142