Bug 2019464

Summary: Add support for OCF 1.1 cluster properties
Product: Red Hat Enterprise Linux 9 Reporter: Tomas Jelinek <tojeline>
Component: pcsAssignee: Miroslav Lisik <mlisik>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.0CC: cfeist, cluster-maint, idevat, mlisik, mmazoure, mpospisi, nhostako, 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-1.el9 Doc Type: Enhancement
Doc Text:
Feature: Add support for OCF 1.1 format of cluster properties metadata. Reason: Enhance verification of new types. Result: Pcs property command now properly read metadata in new format and validate against it.
Story Points: ---
Clone Of:
: 2112002 (view as bug list) Environment:
Last Closed: 2023-05-09 07:18:23 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: 2018969    
Bug Blocks: 2019471    

Description Tomas Jelinek 2021-11-02 15:42:32 UTC
In bz1281463, pacemaker have migrated cluster properties metadata to OCF 1.1 format. In order for pcs to still be able to validate cluster properties and their values, we need to use the new OCF 1.1 capable parser and update validators in pcs.

Comment 3 Miroslav Lisik 2022-11-16 15:35:55 UTC
Upstream commit: https://github.com/ClusterLabs/pcs/commit/f51fdd340147b72c6099864f649cfbbe5f4051d4
Updated commands:
  * pcs property set
  * pcs property unset

Property commands has been updated to be able properly read new OCF 1.1 format of properties metadata and validate against it.
Everything should work as before with additional validations.

Test:

[root@r9-node-01 ~]# /usr/libexec/pacemaker/pacemaker-schedulerd metadata | grep \<version\>
  <version>1.1</version>

[root@r9-node-01 ~]# pcs property set no-quorum-policy=unknown
Error: 'unknown' is not a valid no-quorum-policy value, use 'demote', 'freeze', 'ignore', 'stop', 'suicide', use --force to override
Error: Errors have occurred, therefore pcs is unable to continue

[root@r9-node-01 ~]# pcs property set no-quorum-policy=unknown --force
Warning: 'unknown' is not a valid no-quorum-policy value, use 'demote', 'freeze', 'ignore', 'stop', 'suicide'

[root@r9-node-01 ~]# pcs property config no-quorum-policy
Cluster Properties:
 no-quorum-policy: unknown

[root@r9-node-01 ~]# pcs property set no-quorum-policy=freeze
[root@r9-node-01 ~]# pcs property config no-quorum-policy
Cluster Properties:
 no-quorum-policy: freeze

Comment 4 Michal Pospisil 2022-11-24 12:18:39 UTC
DevTestResults:

[root@r09-02-a ~]# rpm -q pcs
pcs-0.11.4-1.el9.x86_64

[root@r09-02-a ~]# /usr/libexec/pacemaker/pacemaker-schedulerd metadata | grep \<version\>
 <version>1.1</version>

[root@r09-02-a ~]# pcs property set no-quorum-policy=unknown
Error: 'unknown' is not a valid no-quorum-policy value, use 'demote', 'freeze', 'ignore', 'stop', 'suicide', use --force to override
Error: Errors have occurred, therefore pcs is unable to continue

[root@r09-02-a ~]# pcs property set no-quorum-policy=unknown --force
Warning: 'unknown' is not a valid no-quorum-policy value, use 'demote', 'freeze', 'ignore', 'stop', 'suicide'

[root@r09-02-a ~]# pcs property config no-quorum-policy
Cluster Properties:
no-quorum-policy: unknown

[root@r09-02-a ~]# pcs property set no-quorum-policy=freeze

[root@r09-02-a ~]# echo $?
0

[root@r09-02-a ~]# pcs property config no-quorum-policy
Cluster Properties:
no-quorum-policy: freeze

Comment 14 errata-xmlrpc 2023-05-09 07:18:23 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