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 1493416 - Allow only OCF resources to be promotable or globally-unique clones
Summary: Allow only OCF resources to be promotable or globally-unique clones
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: pcs
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 9.2
Assignee: Ondrej Mular
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-20 07:18 UTC by Tomas Jelinek
Modified: 2023-05-09 07:38 UTC (History)
8 users (show)

Fixed In Version: pcs-0.11.3-5.el9
Doc Type: Bug Fix
Doc Text:
Cause: User tries to create a globally-unique or promotable clone from resource which is using non-ocf resource agent Consequence: This crated an invalid configuration for pacemaker and the resource will also disappear from output of `pcs status` command. Fix: Restrict creating globally-unique and promotable clones to resources using ocf resource agents. Result: User is now unable to create globally-unique and promotable clones from resources using an unsupported agents.
Clone Of:
: 2112260 (view as bug list)
Environment:
Last Closed: 2023-05-09 07:18:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2055028 1 unspecified CLOSED Cluster pacemaker complains about a resource which is not there 2022-04-19 16:37:11 UTC
Red Hat Issue Tracker CLUSTERQE-5753 0 None None None 2022-05-23 16:03:16 UTC
Red Hat Issue Tracker RHELPLAN-113691 0 None None None 2022-02-24 15:41:59 UTC
Red Hat Product Errata RHBA-2023:2151 0 None None None 2023-05-09 07:18:47 UTC

Internal Links: 2055028

Description Tomas Jelinek 2017-09-20 07:18:45 UTC
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

Comment 1 Tomas Jelinek 2017-09-20 07:19:20 UTC
This has been reported upstream:
http://lists.clusterlabs.org/pipermail/users/2017-September/006494.html

Comment 3 RHEL Program Management 2021-01-15 07:42:23 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 8 RHEL Program Management 2022-08-24 07:27:46 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 11 Ondrej Mular 2022-10-24 13:07:19 UTC
Upstream patch: https://github.com/ClusterLabs/pcs/commit/3ca619c5864d290a853979f57fc8227e8e6cbf03

Test:
[root@rhel92-devel1 pcs]# pcs resource create test_resource systemd:chronyd promotable
Error: Clone option 'promotable' is not compatible with 'systemd:chronyd' resource agent
Error: Errors have occurred, therefore pcs is unable to continue
[root@rhel92-devel1 pcs]# echo $?
1

Comment 12 Miroslav Lisik 2022-10-26 13:12:18 UTC
DevTestResults:

[root@r92-1 ~]# rpm -q pcs
pcs-0.11.3-5.el9.x86_64

[root@r92-1 ~]# pcs resource create test_resource systemd:chronyd promotable
Error: Clone option 'promotable' is not compatible with 'systemd:chronyd' resource agent
Error: Errors have occurred, therefore pcs is unable to continue
[root@r92-1 ~]# echo $?
1

Comment 18 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


Note You need to log in before you can comment on or make changes to this bug.