ClusterLabs / crmsh

Command-line interface for High-Availability cluster management on GNU/Linux systems.
GNU General Public License v2.0
131 stars 94 forks source link

Feature request: cleanup on an imported (non-live) CIB #1148

Open jirib opened 1 year ago

jirib commented 1 year ago
# rpm -q crmsh
crmsh-4.4.0+20221209.64abfaca-150400.3.12.1.noarch

After importing a customer CIB for an analysis - crm> cib import <file> - I was thinking to remove past failures etc..., so verify does not show already "solved" (eg. via correcting cluster settings) errors.

But this is not possible - could this be considered?

crm(cib.xml/jb154sapqe01)# resource cleaup
INFO: "cleaup" is accepted as "cleanup"
crm_resource: Error connecting to the controller: Connection refused
Error performing operation: Not connected
liangxin1300 commented 1 year ago

Hi @jirib , When you got:

crm_resource: Error connecting to the controller: Connection refused
Error performing operation: Not connected

Is your cluster running?

And, if your cluster is running, I think after import, you need to run crm cib commit, Or the related resource couldn't be real running at the cluster nodes. Then try to use crm resource cleanup

jirib commented 1 year ago

Hi @jirib , When you got:

crm_resource: Error connecting to the controller: Connection refused
Error performing operation: Not connected

Is your cluster running?

And, if your cluster is running, I think after import, you need to run crm cib commit, Or the related resource couldn't be real running at the cluster nodes. Then try to use crm resource cleanup

No, no cluster is running. I used crm in this context only for checking external CIBs, thus no commit is wanted.

liangxin1300 commented 1 year ago

crm resource cleanup will call crm_resource command, which I think just works for the running cluster

jirib commented 1 year ago

That's why I used 'Feature request'; thus it would be nice to confider such functionality. As I said, I used crm for troubleshooting only (on this particular system).

liangxin1300 commented 1 year ago

Thanks! We will evaluate this