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.
+++ 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
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.