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 1384485 - pcs should validate resource/stonith agents metadata upon reading
Summary: pcs should validate resource/stonith agents metadata upon reading
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: pre-dev-freeze
: 8.6
Assignee: Ondrej Mular
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 2019836
Blocks: 1936833 2018969
TreeView+ depends on / blocked
 
Reported: 2016-10-13 11:41 UTC by Tomas Jelinek
Modified: 2022-05-10 15:24 UTC (History)
7 users (show)

Fixed In Version: pcs-0.10.12-2.el8
Doc Type: Enhancement
Doc Text:
Feature: Pcs now validates resource and stonith agent metadata XML against OCF schemas. Reason: Provide better error messages when metadata do not match the schema. Result: If metadata provided by an agent do not match OCF schema, pcs provides a descriptive error message pointing to a line not complying with the schema.
Clone Of:
: 2019836 (view as bug list)
Environment:
Last Closed: 2022-05-10 14:50:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-5138 0 None None None 2021-10-25 19:45:15 UTC
Red Hat Issue Tracker CLUSTERQE-5490 0 None None None 2022-03-15 05:01:24 UTC
Red Hat Product Errata RHEA-2022:1978 0 None None None 2022-05-10 14:51:15 UTC

Description Tomas Jelinek 2016-10-13 11:41:39 UTC
Pcs should validate resource, fence and fake pacemaker (stonithd, cib, crmd, pengine) agents' metadata upon reading. This is currently not possible as the metadata do not conform to the schema - see bz1384484.

Comment 4 RHEL Program Management 2020-11-01 03:03:07 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 5 Tomas Jelinek 2021-10-07 14:31:23 UTC
We will use a custom RNG shipped with pcs to validate OCF 1.0 agents to work around bz1384484.

Comment 9 Miroslav Lisik 2021-11-23 08:21:21 UTC
DevTestResults:

[root@r8-node-01 ~]# rpm -q pcs
pcs-0.10.11-2.el8.x86_64

Edit metadata for Dummy resource agent
'/usr/lib/ocf/resource.d/pacemaker/Dummy' in way which is not compliant with
'/usr/lib64/pcs/data/ocf-1.0.rng' or '/usr/lib64/pcs/data/ocf-1.1.rng'

Changed value of reloadable atrribute of parameter named 'passwd' from
reloadable="1" to reloadable="true".

[root@r8-node-01 ~]# crm_resource --show-metadata=ocf:pacemaker:Dummy | xmllint --xpath "//parameter[@name='passwd']/@reloadable" -
 reloadable="true"

Try to create a Dummy resource:

[root@r8-node-01 ~]# pcs resource create d-01 ocf:pacemaker:Dummy
Error: Agent 'ocf:pacemaker:Dummy' is not installed or does not provide valid metadata: Invalid attribute reloadable for element parameter, line 23, use --force to override
Error: Errors have occurred, therefore pcs is unable to continue
[root@r8-node-01 ~]# echo $?
1

Comment 14 Ondrej Mular 2021-12-07 13:37:25 UTC
Additional patch fixing traceback:
https://github.com/ClusterLabs/pcs/commit/674785c3ca15e7fec40d358cbf8ab4c32156d9af

Comment 16 Miroslav Lisik 2021-12-16 16:20:04 UTC
DevTestResults:

[root@r8-node-01 ~]# rpm -q pcs
pcs-0.10.12-2.el8.x86_64

[root@r8-node-01 ~]# pcs resource create not_installed ocf:pacemaker:not_installed --disabled --force
Warning: Agent 'ocf:pacemaker:not_installed' is not installed or does not provide valid metadata: crm_resource: Metadata query for ocf:pacemaker:not_installed failed: No such device or address, Error performing operation: No such object
[root@r8-node-01 ~]# pcs resource config
 Resource: not_installed (class=ocf provider=pacemaker type=not_installed)
  Meta Attrs: target-role=Stopped
  Operations: monitor interval=60s (not_installed-monitor-interval-60s)


[root@r8-node-01 ~]# pcs resource update not_installed a=b --force
Warning: Agent 'ocf:pacemaker:not_installed' is not installed or does not provide valid metadata: crm_resource: Metadata query for ocf:pacemaker:not_installed failed: No such device or address, Error performing operation: No such object
[root@r8-node-01 ~]# pcs resource config
 Resource: not_installed (class=ocf provider=pacemaker type=not_installed)
  Attributes: a=b
  Meta Attrs: target-role=Stopped
  Operations: monitor interval=60s (not_installed-monitor-interval-60s)

Resource is updated.

Comment 20 errata-xmlrpc 2022-05-10 14:50:42 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/RHEA-2022:1978


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