Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2158790

Summary: pcs should validate the type of stonith-watchdog-timeout value based on OCF1.1 format of metadata
Product: Red Hat Enterprise Linux 9 Reporter: Nina Hostakova <nhostako>
Component: pcsAssignee: Miroslav Lisik <mlisik>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.2CC: cluster-maint, idevat, mlisik, mmazoure, mpospisi, omular, tojeline
Target Milestone: rcKeywords: Triaged
Target Release: 9.2Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.11.4-4.el9 Doc Type: No Doc Update
Doc Text:
The affected packages have not been released.
Story Points: ---
Clone Of:
: 2158804 (view as bug list) Environment:
Last Closed: 2023-05-09 07:18:34 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:
Bug Depends On:    
Bug Blocks: 2158804    

Description Nina Hostakova 2023-01-06 15:44:17 UTC
Description of problem:
The metadata for 'stonith-watchdog-timeout' property states that it supports time values. However, a time value cannot be set for this property.

Version-Release number of selected component (if applicable):
pcs-0.11.4-1.el9

Actual results:
# /usr/libexec/pacemaker/pacemaker-controld metadata | grep -A3 stonith-watchdog-timeout
    <parameter name="stonith-watchdog-timeout">
      <longdesc lang="en">If this is set to a positive value, lost nodes are assumed to self-fence using watchdog-based SBD within this much time. This does not require a fencing resource to be explicitly configured, though a fence_watchdog resource can be configured, to limit use to specific nodes. If this is set to 0 (the default), the cluster will never assume watchdog-based self-fencing. If this is set to a negative value, the cluster will use twice the local value of the `SBD_WATCHDOG_TIMEOUT` environment variable if that is positive, or otherwise treat this as 0. WARNING: When used, this timeout must be larger than `SBD_WATCHDOG_TIMEOUT` on all nodes that use watchdog-based SBD, and Pacemaker will refuse to start on any of those nodes where this is not true for the local value or SBD is not active. When this is set to a negative value, `SBD_WATCHDOG_TIMEOUT` must be set to the same value on all nodes that use SBD, otherwise data corruption or loss could occur.</longdesc>
      <shortdesc lang="en">How long before nodes can be assumed to be safely down when watchdog-based self-fencing via SBD is in use</shortdesc>
      <content type="time" default="0"/>

# pcs property set stonith-watchdog-timeout=6s
Error: The stonith-watchdog-timeout must be greater than SBD watchdog timeout '5', entered '6s', use --force to override
Error: Errors have occurred, therefore pcs is unable to continue


Expected results:
pcs can validate time values prior to other validations specific to this property

Additional info:
bz2019464 comment 11

Comment 3 Miroslav Lisik 2023-01-13 08:33:08 UTC
Upstream patch: https://github.com/ClusterLabs/pcs/commit/c5dbe56a2c001ea33c2bd6ba2d54dd457d38cc51

Test:
Environment: Cluster with enabled watchdog-only sbd

(pcs) [root@r9-node-01 pcs]# pcs property set stonith-watchdog-timeout="invalid"
Error: 'invalid' is not a valid stonith-watchdog-timeout value, use time interval (e.g. 1, 2s, 3m, 4h, ...)
Error: Errors have occurred, therefore pcs is unable to continue

(pcs) [root@r9-node-01 pcs]# pcs property set stonith-watchdog-timeout="10s"
(pcs) [root@r9-node-01 pcs]# pcs property config stonith-watchdog-timeout
Cluster Properties:
 stonith-watchdog-timeout: 10s

(pcs) [root@r9-node-01 pcs]# pcs property set stonith-watchdog-timeout="10"
(pcs) [root@r9-node-01 pcs]# pcs property config stonith-watchdog-timeout
Cluster Properties:
 stonith-watchdog-timeout: 10

(pcs) [root@r9-node-01 pcs]# pcs property set stonith-watchdog-timeout="4s"
Error: The stonith-watchdog-timeout must be greater than SBD watchdog timeout '5', entered '4s', use --force to override
Error: Errors have occurred, therefore pcs is unable to continue
(pcs) [root@r9-node-01 pcs]# pcs property config stonith-watchdog-timeout
Cluster Properties:
 stonith-watchdog-timeout: 10

Comment 4 Michal Pospisil 2023-01-13 19:32:52 UTC
DevTestResults:

[root@r09-02-c ~]# pcs property set stonith-watchdog-timeout="invalid"
Error: 'invalid' is not a valid stonith-watchdog-timeout value, use time interval (e.g. 1, 2s, 3m, 4h, ...)
Error: Errors have occurred, therefore pcs is unable to continue

[root@r09-02-c ~]# pcs property set stonith-watchdog-timeout="10s"

[root@r09-02-c ~]# pcs property config stonith-watchdog-timeout
Cluster Properties:
stonith-watchdog-timeout: 10s

[root@r09-02-c ~]# pcs property set stonith-watchdog-timeout="10"

[root@r09-02-c ~]# pcs property config stonith-watchdog-timeout   
Cluster Properties:
stonith-watchdog-timeout: 10

[root@r09-02-c ~]# pcs property set stonith-watchdog-timeout="4s"
Error: The stonith-watchdog-timeout must be greater than SBD watchdog timeout '5', entered '4s', use --force to override
Error: Errors have occurred, therefore pcs is unable to continue

[root@r09-02-c ~]# pcs property config stonith-watchdog-timeout   
Cluster Properties:
stonith-watchdog-timeout: 10

Comment 10 errata-xmlrpc 2023-05-09 07:18:34 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 (pcs 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/RHBA-2023:2151