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 2036633 - Error: Agent 'ocf:linbit:drbd' is not installed or does not provide valid metadata: Element content failed to validate content, line 117, use --force to override
Summary: Error: Agent 'ocf:linbit:drbd' is not installed or does not provide valid met...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.6
Hardware: x86_64
OS: Unspecified
medium
medium
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-01-03 13:13 UTC by Marco Fortina
Modified: 2023-09-27 16:34 UTC (History)
13 users (show)

Fixed In Version: pcs-0.10.12-3.el8
Doc Type: No Doc Update
Doc Text:
The affected packages were not released
Clone Of:
Environment:
Last Closed: 2022-05-10 14:50:48 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1936833 1 high CLOSED Support version 1.1 of the OCF Resource Agent API standard 2023-10-11 07:26:25 UTC
Red Hat Issue Tracker KCSOPP-1856 0 None None None 2023-07-26 12:56:43 UTC
Red Hat Issue Tracker RHELPLAN-106758 0 None None None 2022-01-03 13:20:14 UTC
Red Hat Knowledge Base (Solution) 7026490 0 None None None 2023-08-01 15:25:14 UTC
Red Hat Product Errata RHEA-2022:1978 0 None None None 2022-05-10 14:51:23 UTC

Description Marco Fortina 2022-01-03 13:13:26 UTC
Description of problem:

Configuring DRBD on Pacemaker cluster I got this error:

[root@node1 setup]# pcs resource create drbd ocf:linbit:drbd drbd_resource=resource0 promotable promoted-max=1 promoted-node-max=1 clone-max=3 clone-node-max=1 notify=true 
Error: Agent 'ocf:linbit:drbd' is not installed or does not provide valid metadata: Element content failed to validate content, line 117, use --force to override
Error: Errors have occurred, therefore pcs is unable to continue


Version-Release number of selected component (if applicable):

[root@node1 ~]# cat /etc/os-release 
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"


[root@node1 ~]# rpm -q pcs
pcs-0.10.12-1.el8.x86_64       


[root@node1 ~]# rpm -q drbd
drbd90-utils-9.19.1-1.el8.elrepo.x86_64



How reproducible:

[root@node1 ~]# pcs resource create drbd ocf:linbit:drbd drbd_resource=resource0 promotable promoted-max=1 promoted-node-max=1 clone-max=3 clone-node-max=1 notify=true 



Steps to Reproduce:
1. Install new CentOS Stream 8 server
2. Install and configure drbd
3. Install pacemaker
4. Try to configure drbd resource


Actual results:

Error: Agent 'ocf:linbit:drbd' is not installed or does not provide valid metadata: Element content failed to validate content, line 117, use --force to override
Error: Errors have occurred, therefore pcs is unable to continue


Expected results:

Cluster resource created.


Additional info:

Downgrading to pcs-0.10.11-1.el8 the issue is not present.

Comment 1 Tomas Jelinek 2022-01-04 09:16:35 UTC
pcs-0.10.12 adds support for OCF 1.1 resource agents. In order to be able to distinguish OCF 1.0 and OCF 1.1 agents and process them correctly, pcs validates agents' metadata against OCF schema. This prevents pcs from crashing due to accessing missing parts of metadata which are mandatory by the standard yet missing in the actual agent not complying to the standard.

The drbd agent specifies <content type="numeric"/> for parameter 'wfc_timeout'. This is not in compliance with OCF 1.0 standard and therefore pcs is right to produce an error. However, this violation is insignificant to pcs, therefore I'm going to relax the validation to make pcs compatible with the existing drbd agent.

Comment 4 Tomas Jelinek 2022-01-04 13:30:40 UTC
Upstream patch:
https://github.com/ClusterLabs/pcs/commit/f34db4f12e100b177e8b56206325e3ae1c28b455


For tests, see comment 0.

Comment 5 Marco Fortina 2022-01-04 13:58:57 UTC
Thanks a lot!

Do you any idea on when a new package version of pcs including this fix will be available?

Best regards,
Marco

Comment 6 Tomas Jelinek 2022-01-04 15:45:57 UTC
(In reply to Marco Fortina from comment #5)
> Do you any idea on when a new package version of pcs including this fix will be available?


Probably in a few weeks. In the meantime, you can either downgrade to pcs-0.10.11, or use --force, or modify ocf-1.0.rng file in your pcs installation, or fix the drbd agent.

Comment 7 Miroslav Lisik 2022-01-14 14:42:15 UTC
DevTestResults:

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

[root@r8-node-01 pcs]# dnf -y install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
...
[root@r8-node-01 pcs]# dnf install drbd84-utils
...

[root@r8-node-01 pcs]# pcs resource create drbd ocf:linbit:drbd drbd_resource=resource0
[root@r8-node-01 pcs]# echo $?
0

Comment 12 Michal Mazourek 2022-02-16 16:08:32 UTC
[root@virt-485 ~]# dnf -y install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
{...}

[root@virt-485 ~]# dnf install drbd84-utils
{...}


BEFORE:
=======

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

[root@virt-485 ~]# pcs resource create drbd ocf:linbit:drbd drbd_resource=resource0
Error: Agent 'ocf:linbit:drbd' is not installed or does not provide valid metadata: Element content failed to validate content, line 117, use --force to override
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


[root@virt-485 ~]# pcs resource create drbd ocf:linbit:drbd drbd_resource=resource0
[root@virt-485 ~]# echo $?
0

[root@virt-485 ~]# pcs resource update drbd ocf:linbit:drbd drbd_resource=resource1
[root@virt-485 ~]# echo $?
0

[root@virt-485 ~]# pcs resource config drbd
 Resource: drbd (class=ocf provider=linbit type=drbd)
  Attributes: drbd_resource=resource1
  Operations: demote interval=0s timeout=90 (drbd-demote-interval-0s)
              monitor interval=20 role=Slave timeout=20 (drbd-monitor-interval-20)
              monitor interval=10 role=Master timeout=20 (drbd-monitor-interval-10)
              notify interval=0s timeout=90 (drbd-notify-interval-0s)
              promote interval=0s timeout=90 (drbd-promote-interval-0s)
              reload interval=0s timeout=30 (drbd-reload-interval-0s)
              start interval=0s timeout=240 (drbd-start-interval-0s)
              stop interval=0s timeout=100 (drbd-stop-interval-0s)

[root@virt-485 ~]# pcs resource delete drbd
Deleting Resource - drbd
[root@virt-485 ~]# echo $?
0


Marking as VERIFIED SanityOnly for pcs-0.10.12-6.el8. Regression test suite will be run as part of bz2012128.

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