Bug 2050274
Summary: | Pcs should process agents not conforming to OCF schema in the same way as before | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Tomas Jelinek <tojeline> |
Component: | pcs | Assignee: | Tomas Jelinek <tojeline> |
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 8.6 | CC: | cluster-maint, idevat, kmalyjur, mlisik, mmazoure, mpospisi, nhostako, omular, slevine, tojeline |
Target Milestone: | rc | Keywords: | EasyFix, Regression, Triaged |
Target Release: | 8.6 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
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.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-10 14:51:30 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-02-03 15:34:54 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). Upstream fix + tests: https://github.com/ClusterLabs/pcs/commit/50f4f1baaf221bfa63e7980792fdd7ef047e9653 For a reproducer, see comment 0 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 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 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 |