Bug 2219555

Summary: [RFE] Add `--safe` option to to `pcs resource clear` command
Product: Red Hat Enterprise Linux 9 Reporter: Ondrej Mular <omular>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: NEW --- QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.3CC: cluster-maint, idevat, mlisik, mpospisi, omular, tojeline
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Ondrej Mular 2023-07-04 09:52:29 UTC
Add option `--safe` to `pcs resource clear` command. If `--safe` is used, pcs should simulate (using simulation functionality of pacemaker) the change first and make sure that no resource (or no specified resources) will be moved after removing the constraint(s). Otherwise the command should fail without committing any changes to the cluster and print out error message with affected resources.

Consider adding `--simulate` option as well. If used, pcs should only do simulation of the change and print out its results.