Bug 1388783 - [cli] a message passed from crm_report suggest using --nodes or --single-node althought these are not supported by pcs
Summary: [cli] a message passed from crm_report suggest using --nodes or --single-node...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-26 07:58 UTC by Radek Steiger
Modified: 2018-04-10 15:38 UTC (History)
5 users (show)

Fixed In Version: pcs-0.9.160-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: User runs 'pcs cluster report' command on a host which is not in a cluster. Consequence: An error message is displayed. It advices using command line options which pcs does not support. Fix: Modify the error message from crm_report before showing it to the user. Result: An explaining error message is displayed.
Clone Of:
Environment:
Last Closed: 2018-04-10 15:37:49 UTC
Target Upstream Version:


Attachments (Terms of Use)
proposed fix (3.67 KB, patch)
2017-09-04 12:27 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0866 0 None None None 2018-04-10 15:38:37 UTC

Description Radek Steiger 2016-10-26 07:58:04 UTC
> Description of problem:

Running a 'pcs cluster report' from outside a cluster result in a following error message:

[root@virt-153 ~]# pcs cluster report --from "2016-10-25 19:05:28"  mylogs
Error: virt-153:   ERROR: Cannot determine nodes; specify --nodes or --single-node

This error is passed directly from crm_report as it suggests using --nodes or --single-node which are however not supported by pcs. 

So we could either:
 - mask this specific error to not disclose such options
 - implement --nodes and --single-node into pcs and pass them as-is to crm_report


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

pcs-0.9.154-1.el6.x86_64

Note: the version used here is a RHEL 6 pcs package, but I suppose we're going to leave the fix for RHEL 7.4 / upstream as this is nothing critical.

Comment 2 Tomas Jelinek 2017-09-04 12:27:19 UTC
Created attachment 1321824 [details]
proposed fix

Before fix:
# pcs cluster report /root/report
Error: rh74-node3:  ERROR: Cannot determine nodes; specify --nodes or --single-node

# pcs cluster report /root/report
Error: rh74-node1:  ERROR: Output directory /root/report already exists, specify an alternate name with --dest



After fix:

# pcs cluster report /root/report
Error: cluster is not configured on this node

# pcs cluster report /root/report
Error: rh74-node1:  ERROR: Output directory /root/report already exists, specify an alternate name with <dest>



The error message should now state clearly what the problem is.

It was not possible to get a report from outside of a cluster due to pcs not allowing to specify --nodes or --single-node. Once we switch to the new pcs architecture, it will be possible to run commands remotely including this one.

Comment 3 Ivan Devat 2017-10-11 08:06:25 UTC
After Fix:

[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.160-1.el7.x86_64

[vm-rhel72-1 ~] $ mkdir report
[vm-rhel72-1 ~] $ pcs cluster report /root/report
Error: vm-rhel72-1:  Calculated node list: vm-rhel72-1 vm-rhel72-3
vm-rhel72-1:  Collecting data from vm-rhel72-1 vm-rhel72-3  (10/09/17 18:00:00 to 10/10/17 18:00:59)
vm-rhel72-1:  ERROR: Output directory /root/report already exists, specify an alternate name with <dest>

[vm-rhel72-1 ~] $ pcs cluster destroy --all
vm-rhel72-1: Stopping Cluster (pacemaker)...
vm-rhel72-3: Stopping Cluster (pacemaker)...
vm-rhel72-1: Successfully destroyed cluster
vm-rhel72-3: Successfully destroyed cluster

[vm-rhel72-1 ~] $ rm -r report
[vm-rhel72-1 ~] $ pcs cluster report /root/report
Error: cluster is not configured on this node

Comment 8 errata-xmlrpc 2018-04-10 15:37:49 UTC
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, 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-2018:0866


Note You need to log in before you can comment on or make changes to this bug.