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 2050274 - Pcs should process agents not conforming to OCF schema in the same way as before
Summary: Pcs should process agents not conforming to OCF schema in the same way as before
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.6
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 8.6
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-03 15:34 UTC by Tomas Jelinek
Modified: 2022-05-10 15:25 UTC (History)
10 users (show)

Fixed In Version: pcs-0.10.12-6.el8
Doc Type: Bug Fix
Doc Text:
Cause: New OCF agents parser, capable of processing both OCf 1.0 and 1.1, validates OCF metadata strictly. Consequence: Agents with minor issues in metadata are rejected with an error by pcs, breaking backward compatibility. Fix: Make processing OCF 1.0 agents more benevolent, turn errors to warnings. Result: Agents working in RHEL 8.5 are still working while pcs warns about issues which will cause such agents to produce errors in RHEL 9.
Clone Of:
Environment:
Last Closed: 2022-05-10 14:51:30 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1937027 1 unspecified CLOSED Support version 1.1 of the OCF Resource Agent API standard 2022-07-25 07:57:44 UTC
Red Hat Issue Tracker RHELPLAN-111010 0 None None None 2022-02-03 15:41:10 UTC
Red Hat Product Errata RHEA-2022:1978 0 None None None 2022-05-10 14:51:33 UTC

Description Tomas Jelinek 2022-02-03 15:34:54 UTC
Description of problem:
Prior implementing support for OCF 1.1 agents and overhauling the whole resource agent module in pcs, agents not conforming to OCF standard were processed by pcs. Nowadays, pcs reports an error and only allows to proceed if --force is specified. That breaks backward compatibility.


Version-Release number of selected component (if applicable):
pcs-0.10.12-4.el8


How reproducible:
always, easily


Steps to Reproduce:
1. Edit any OCF agent so that its version tag is not 1.0 or 1.1.
2. Use such agent in 'pcs resource describe', 'pcs resource create' or 'pcs resource update' commands


Actual results:
Pcs prints an error:
Error: Unable to process agent 'ocf:heartbeat:SAPHanaTopology' as it implements unsupported OCF version '0.155.0', supported versions are: '1.0', '1.1', use --force to override


Expected results:
Print a warning instead and proceed.


Additional info:
See also bz1937027 comment3

Comment 1 Chris Feist 2022-02-03 16:42:49 UTC
Additional justification for inclusion in 8.6.  We've discovered a few agents internally that had issues (and we are fixing), but this indicates to me that there may be many customer agents that have similar issues and will break when customers try to add them on 8.6.  I think it's best to just warn the user, but continuing functioning normally until 9.0 (where we currently require --force).

Comment 6 Tomas Jelinek 2022-02-09 15:28:02 UTC
Upstream fix + tests: https://github.com/ClusterLabs/pcs/commit/50f4f1baaf221bfa63e7980792fdd7ef047e9653

For a reproducer, see comment 0

Comment 8 Miroslav Lisik 2022-02-11 14:36:56 UTC
DevTestResults:

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

[root@r8-node-01 ~]# cp /usr/lib/ocf/resource.d/pacemaker/Dummy{,.bak}
[root@r8-node-01 ~]# sed -i "s/<version>1.1<\/version>/<version>2022<\/version>/" /usr/lib/ocf/resource.d/pacemaker/Dummy
[root@r8-node-01 ~]# sed -n "/<version>.*<\/version>/p" /usr/lib/ocf/resource.d/pacemaker/Dummy
<version>2022</version>

[root@r8-node-01 ~]# pcs resource describe ocf:pacemaker:Dummy
Warning: Agent 'ocf:pacemaker:Dummy' implements unsupported OCF version '2022', supported versions are: '1.0', '1.1'; assumed version '1.0'
Warning: Agent 'ocf:pacemaker:Dummy' is not installed or does not provide valid metadata: Invalid attribute unique-group for element parameter, line 14
ocf:pacemaker:Dummy - Example stateless resource agent

This is a dummy OCF resource agent. It does absolutely nothing except keep track
of whether it is running or not, and can be configured so that actions fail or
take a long time. Its purpose is primarily for testing, and to serve as a
template for resource agent writers.

Resource options:
  state: Location to store the resource state in.
  passwd: Fake password field
  fake: Fake attribute that can be changed to cause an agent reload
  op_sleep: Number of seconds to sleep during operations. This can be used to test how the cluster reacts to operation timeouts.
  fail_start_on: Start, migrate_from, and reload-agent actions will return failure if running on the host specified here, but the resource will run successfully anyway (future monitor calls will find it running). This can be used to test
                 on-fail=ignore.
  envfile: If this is set, the environment will be dumped to this file for every call.

Default operations:
  start: interval=0s timeout=20s
  stop: interval=0s timeout=20s
  monitor: interval=10s timeout=20s
  reload: interval=0s timeout=20s
  reload-agent: interval=0s timeout=20s
  migrate_to: interval=0s timeout=20s
  migrate_from: interval=0s timeout=20s


[root@r8-node-01 ~]# pcs resource create dummy ocf:pacemaker:Dummy
Warning: Agent 'ocf:pacemaker:Dummy' implements unsupported OCF version '2022', supported versions are: '1.0', '1.1'; assumed version '1.0'
Warning: Agent 'ocf:pacemaker:Dummy' is not installed or does not provide valid metadata: Invalid attribute unique-group for element parameter, line 14

[root@r8-node-01 ~]# pcs resource update dummy passwd=pass
Warning: Agent 'ocf:pacemaker:Dummy' implements unsupported OCF version '2022', supported versions are: '1.0', '1.1'; assumed version '1.0'
Warning: Agent 'ocf:pacemaker:Dummy' is not installed or does not provide valid metadata: Invalid attribute unique-group for element parameter, line 14

Comment 12 Michal Mazourek 2022-02-22 12:28:21 UTC
BEFORE:
=======

[root@virt-485 ~]# rpm -q pcs
pcs-0.10.12-5.el8.x86_64


## Set version for dummy to not conform OCF schema

[root@virt-485 ~]# sed -i "s/<version>1.1<\/version>/<version>0.155.0<\/version>/" /usr/lib/ocf/resource.d/pacemaker/Dummy
[root@virt-485 ~]# cat /usr/lib/ocf/resource.d/pacemaker/Dummy | grep \<version\>
<version>0.155.0</version>


## Trying to create the changed dummy 

[root@virt-485 ~]# pcs resource create dummy ocf:pacemaker:Dummy
Error: Unable to process agent 'ocf:pacemaker:Dummy' as it implements unsupported OCF version '0.155.0', supported versions are: '1.0', '1.1', use --force to override
Error: Errors have occurred, therefore pcs is unable to continue
[root@virt-485 ~]# echo $?
1
[root@virt-485 ~]# pcs resource
NO resources configured

[root@virt-485 ~]# pcs resource describe ocf:pacemaker:Dummy
Error: Unable to process agent 'ocf:pacemaker:Dummy' as it implements unsupported OCF version '0.155.0', supported versions are: '1.0', '1.1'
Error: Errors have occurred, therefore pcs is unable to continue
[root@virt-485 ~]# echo $?
1


AFTER:
======

[root@virt-485 ~]# rpm -q pcs
pcs-0.10.12-6.el8.x86_64


## Set version for Dummy to not conform OCF schema

[root@virt-485 ~]# sed -i "s/<version>1.1<\/version>/<version>0.155.0<\/version>/" /usr/lib/ocf/resource.d/pacemaker/Dummy
[root@virt-485 ~]# cat /usr/lib/ocf/resource.d/pacemaker/Dummy | grep \<version\>
<version>0.155.0</version>


## Trying to create, describe and update the changed Dummy

[root@virt-485 ~]# pcs resource create dummy ocf:pacemaker:Dummy
Warning: Agent 'ocf:pacemaker:Dummy' implements unsupported OCF version '0.155.0', supported versions are: '1.0', '1.1'; assumed version '1.0'
Warning: Agent 'ocf:pacemaker:Dummy' is not installed or does not provide valid metadata: Invalid attribute unique-group for element parameter, line 14
[root@virt-485 ~]# echo $?
0
[root@virt-485 ~]# pcs resource
  * dummy	(ocf::pacemaker:Dummy):	 Started virt-485

> OK: The resource can be created, but the warning about the OCF version is still present


[root@virt-485 ~]# pcs resource describe ocf:pacemaker:Dummy
Warning: Agent 'ocf:pacemaker:Dummy' implements unsupported OCF version '0.155.0', supported versions are: '1.0', '1.1'; assumed version '1.0'
Warning: Agent 'ocf:pacemaker:Dummy' is not installed or does not provide valid metadata: Invalid attribute unique-group for element parameter, line 14
ocf:pacemaker:Dummy - Example stateless resource agent
{...}
[root@virt-485 ~]# echo $?
0

[root@virt-485 ~]# pcs resource update dummy passwd=1234
Warning: Agent 'ocf:pacemaker:Dummy' implements unsupported OCF version '0.155.0', supported versions are: '1.0', '1.1'; assumed version '1.0'
Warning: Agent 'ocf:pacemaker:Dummy' is not installed or does not provide valid metadata: Invalid attribute unique-group for element parameter, line 14
[root@virt-485 ~]# echo $?
0
[root@virt-485 ~]# pcs resource config
 Resource: dummy (class=ocf provider=pacemaker type=Dummy)
  Attributes: passwd=1234
  Operations: migrate_from interval=0s timeout=20s (dummy-migrate_from-interval-0s)
              migrate_to interval=0s timeout=20s (dummy-migrate_to-interval-0s)
              monitor interval=10s timeout=20s (dummy-monitor-interval-10s)
              reload interval=0s timeout=20s (dummy-reload-interval-0s)
              reload-agent interval=0s timeout=20s (dummy-reload-agent-interval-0s)
              start interval=0s timeout=20s (dummy-start-interval-0s)
              stop interval=0s timeout=20s (dummy-stop-interval-0s)

> OK


Marking as VERIFIED for pcs-0.10.12-6.el8

Comment 14 errata-xmlrpc 2022-05-10 14:51:30 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.