Bug 2232090

Summary: 'pcs booth destroy' command only works for hosts with a running cluster
Product: Red Hat Enterprise Linux 9 Reporter: Tomas Jelinek <tojeline>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: NEW --- QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.0CC: cluster-maint, idevat, mlisik, mpospisi, omular, tojeline
Target Milestone: rcKeywords: Triaged
Target Release: 9.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
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 Tomas Jelinek 2023-08-15 09:17:27 UTC
Description of problem:
The 'pcs booth destroy' command is supposed to remove booth configuration files (config and key) from a node, regardless if it is a site node or an arbitrator node. The command implements various checks to prevent removing booth configuration in case it is being actively used by a running instance of booth. One of the check is bugged, as it requires CIB to be accessible, which makes the command not working on arbitrators and nodes with no cluster.


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


How reproducible:
always, easily


Steps to Reproduce:
1. get a host with no running cluster
2. run 'pcs booth destroy'


Actual results:
Error: unable to get cib


Expected results:
If CIB cannot be obtained, it means either the cluster is stopped on the node, or the node serves as an arbitrator. The command should proceed and check if the booth config is used by a running arbitrator service on the node. If the config is not used, it should be deleted including related key file.