Bug 1984901

Summary: sbd can't be enabled via pcs with stopped cluster
Product: Red Hat Enterprise Linux 8 Reporter: Michal Mazourek <mmazoure>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.5CC: cfeist, cluster-maint, idevat, kmalyjur, mlisik, mpospisi, nhostako, omular, tojeline
Target Milestone: betaKeywords: Regression, Triaged
Target Release: 8.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.10.9-1.el8 Doc Type: No Doc Update
Doc Text:
The bugged version has never been shipped.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 17:34:53 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:
Attachments:
Description Flags
proposed fix none

Description Michal Mazourek 2021-07-22 12:47:53 UTC
Description of problem:
An error occurs when enabling sbd with stopped cluster, pcsd will fail to remove stonith-watchdog-timeout property.


Version-Release number of selected component (if applicable):
pcs-0.10.8-2.el8


How reproducible:
always


Steps to Reproduce:

[root@virt-267 ~]# pcs status
Error: error running crm_mon, is pacemaker running?
  crm_mon: Error: cluster is not available on this node

[root@virt-267 ~]# pcs stonith sbd enable
Running SBD pre-enabling checks...
virt-267: SBD pre-enabling checks done
virt-268: SBD pre-enabling checks done
Distributing SBD config...
virt-267: SBD config saved
virt-268: SBD config saved
Warning: virt-267: ERROR
Warning: virt-268: ERROR
Error: Unable to perform operation on any available node/host, therefore it is not possible to continue
Error: Errors have occurred, therefore pcs is unable to continue


Actual results:
command ends with an error and sbd is not set


Expected results:
error doesn't occur, sbd is set


Additional info: 
from pcsd log:
I, [2021-07-22T13:17:13.184 #00017]     INFO -- : Failed to remove cluster property "stonith-watchdog-timeout"
W, [2021-07-22T13:17:13.185 #00000]  WARNING -- : 400 GET /remote/remove_stonith_watchdog_timeout (2620:52:0:25a4:1800:ff:fe00:123) 1887.62ms

Comment 2 Tomas Jelinek 2021-07-23 13:01:20 UTC
Created attachment 1804851 [details]
proposed fix

See comment 0 for tests

Comment 4 Miroslav Lisik 2021-08-10 13:40:35 UTC
DevTestResults:

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

[root@r8-node-01 ~]# for n in r8-node-0{1..3}; do pcs status; done
Error: error running crm_mon, is pacemaker running?
  crm_mon: Error: cluster is not available on this node
Error: error running crm_mon, is pacemaker running?
  crm_mon: Error: cluster is not available on this node
Error: error running crm_mon, is pacemaker running?
  crm_mon: Error: cluster is not available on this node


[root@r8-node-01 ~]# pcs stonith sbd status
SBD STATUS
<node name>: <installed> | <enabled> | <running>
r8-node-03: YES |  NO |  NO
r8-node-02: YES |  NO |  NO
r8-node-01: YES |  NO |  NO
[root@r8-node-01 ~]# pcs stonith sbd enable
Running SBD pre-enabling checks...
r8-node-03: SBD pre-enabling checks done
r8-node-02: SBD pre-enabling checks done
r8-node-01: SBD pre-enabling checks done
Distributing SBD config...
r8-node-01: SBD config saved
r8-node-02: SBD config saved
r8-node-03: SBD config saved
Enabling sbd...
r8-node-01: sbd enabled
r8-node-03: sbd enabled
r8-node-02: sbd enabled
[root@r8-node-01 ~]# pcs stonith sbd status
SBD STATUS
<node name>: <installed> | <enabled> | <running>
r8-node-01: YES | YES |  NO
r8-node-03: YES | YES |  NO
r8-node-02: YES | YES |  NO

Comment 10 errata-xmlrpc 2021-11-09 17:34:53 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