Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
+++ This bug was initially created as a clone of Bug #2159454 +++
Description of problem:
In bz1816852, calling agents 'validate-all' action from pcs was implemented. The action is called by default when creating or updating a resource. Majority of resource and stonith agents are not ready for their validate-all action to be run in this context, however. Agents provide confusing messages or report errors when they shouldn't.
In order to give agent developers time to fix these issues, pcs will call validate-all action only when requested by users and not by default.
Version-Release number of selected component (if applicable):
pcs-0.10.14-6.el8
How reproducible:
always, easily
Steps to Reproduce:
Run 'pcs (resource|stonith) (create|update)' with --debug and observe pcs calling 'crm_resource --validate'
Actual results:
pcs calls 'crm_resource --validate'
Expected results:
pcs doesn't call 'crm_resource --validate' unless explicitly requested
Upstream patch: https://github.com/ClusterLabs/pcs/commit/4e22f7b1070c37ab25c8da015c00926023bde52e
Test:
[root@rhel88-node1 pcs]# pcs resource create test_resource apache --agent-validation
Assumed agent name 'ocf:heartbeat:apache' (deduced from 'apache')
Error: Validation result from agent (use --force to override):
ocf-exit-reason:apache httpd program not found
ocf-exit-reason:environment is invalid, resource considered stopped
Error: Errors have occurred, therefore pcs is unable to continue
[root@rhel88-node1 pcs]# echo $?
1
[root@rhel88-node1 pcs]# pcs resource create test_resource apache
Assumed agent name 'ocf:heartbeat:apache' (deduced from 'apache')
[root@rhel88-node1 pcs]# echo $?
0
DevTestResults:
[root@r08-08-a pcs]# pcs resource create test_resource apache --agent-validation
Assumed agent name 'ocf:heartbeat:apache' (deduced from 'apache')
Error: Validation result from agent (use --force to override):
ocf-exit-reason:apache httpd program not found
ocf-exit-reason:environment is invalid, resource considered stopped
Error: Errors have occurred, therefore pcs is unable to continue
[root@r08-08-a pcs]# echo $?
1
[root@r08-08-a pcs]# pcs resource create test_resource apache
Assumed agent name 'ocf:heartbeat:apache' (deduced from 'apache')
[root@r08-08-a pcs]# echo $?
0
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:2738