Bug 1955792

Summary: RFE: crm_resource option to pass OCF_CHECK_LEVEL to OCF resource agents
Product: Red Hat Enterprise Linux 8 Reporter: Ken Gaillot <kgaillot>
Component: pacemakerAssignee: Chris Lumens <clumens>
Status: ON_QA --- QA Contact: cluster-qe <cluster-qe>
Severity: low Docs Contact:
Priority: high    
Version: 8.0CC: cluster-maint, kgaillot, msmazova
Target Milestone: betaKeywords: FutureFeature, Triaged
Target Release: 8.5   
Hardware: All   
OS: All   
Fixed In Version: pacemaker-2.1.0-1.el8 Doc Type: No Doc Update
Doc Text:
This is more useful for use by pcs than by end users
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1816852    

Description Ken Gaillot 2021-04-30 19:15:51 UTC
Description of problem: Pacemaker's crm_resource command-line tool has the --force-check option to directly run an OCF resource agent's monitor action, and --validate to directly run an agent's validate-all action. The recently adopted OCF Resource Agent API 1.1 standard allows those agent actions to behave differently depending on the value of the OCF_CHECK_LEVEL environment variable. A user could explicitly set that variable before calling crm_resource, but it would be more convenient to have a tool option for it.

Comment 1 Ken Gaillot 2021-04-30 19:21:52 UTC
I'm thinking this could either be a new option (e.g. --check-level <N>), or the --validate and --force-check options could be modified to take the check level as an optional argument (e.g. --validate to leave OCF_CHECK_LEVEL unset and --validate 10 to set OCF_CHECK_LEVEL to 10).

Comment 4 Ken Gaillot 2021-05-20 20:41:03 UTC
Feature added upstream by commit 3905e7ea