Bug 2112260

Summary: Allow only OCF resources to be promotable or globally-unique clones
Product: Red Hat Enterprise Linux 8 Reporter: Tomas Jelinek <tojeline>
Component: pcsAssignee: Ondrej Mular <omular>
Status: CLOSED WONTFIX QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: cfeist, cluster-maint, cluster-qe, idevat, kmalyjur, mlisik, mmazoure, mpospisi, omular, tojeline
Target Milestone: rcKeywords: Triaged
Target Release: 8.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1493416 Environment:
Last Closed: 2022-11-10 13:33:40 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 Tomas Jelinek 2022-07-29 08:00:11 UTC
+++ This bug was initially created as a clone of Bug #1493416 +++

Description of problem:
In order to use a resource as a master/slave, the resource must support promote and demote actions. Similarly there are requirements a resource agent must fulfill in order to be used as a globally-unique clone. Both of these are described in Pacemaker Explained.

Since only OCF agents may support these additional requirements, pcs should check the resource type prior making it a master/slave or a globally-unique clone and exit with an error if the resource is not of OCF standard.


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


How reproducible:
always, easily


Steps to Reproduce:
# pcs resource create test systemd:postfix
# pcs resource master test
# pcs cluster verify -V
   error: native_unpack:        Resource test:0 is of type systemd and therefore cannot be used as a master/slave resource
   error: create_child_clone:   Failed unpacking resource test
   error: unpack_resources:     Failed unpacking master test-master
Errors found during check: config not valid 


Actual results:
A master/slave resource is created. The resource is not shown in the "pcs status" output (which is correct as pacemaker cannot unpack it - see bz1447951).


Expected results:
Pcs does not allow to make a non-ocf resource a master/slave resource. The same goes for globally-unique clones. We do not necessarily need to check if an OCF resource actually supports being a master/slave or a globally-unique clone - if it does not, an error will be displayed in the "pcs status" output.


Additional info:
Commands to fix:
* pcs resource create - check both the master keyword and the globally-unique meta attribute
* pcs resource master
* pcs resource clone - check the globally-unique meta attribute
* pcs resource update - check the globally-unique meta attribute
* pcs resource meta - check the globally-unique meta attribute


This has been reported upstream:
http://lists.clusterlabs.org/pipermail/users/2017-September/006494.html

Comment 1 Tomas Jelinek 2022-11-10 13:33:40 UTC
Due to high complexity of the fix, its low priority and current stage of RHEL 8 lifecycle, this is not going to be fixed. If you would like this to be fixed in RHEL 8, feel free to reopen the BZ with a justification.