Bug 1489447 - invalid --ssh-config path is not reported correctly, allowing checks
Summary: invalid --ssh-config path is not reported correctly, allowing checks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: Ceph-Medic
Version: 3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: 3.0
Assignee: Andrew Schoen
QA Contact: Shreekar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-07 13:19 UTC by Shreekar
Modified: 2017-12-05 23:42 UTC (History)
4 users (show)

Fixed In Version: RHEL: ceph-medic-1.0.3-1.el7cp Ubuntu: ceph-medic_1.0.3-2redhat1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-05 23:42:05 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-medic pull 59 0 None None None 2017-09-12 17:44:01 UTC
Red Hat Product Errata RHBA-2017:3387 0 normal SHIPPED_LIVE Red Hat Ceph Storage 3.0 bug fix and enhancement update 2017-12-06 03:03:45 UTC

Description Shreekar 2017-09-07 13:19:55 UTC
Description of problem:
While executing "ceph-medic  valid and invalid ssh-config check",outputs are same,returned error which was not user friendly.For both  RHEL 7.4 and Ubuntu 16.04 OS


Version-Release number of selected component (if applicable):
ceph-medic 1.0.2

How reproducible:
Always

Steps to Reproduce:
1. Try to check health of a ceph cluster  using ceph-medic.

Actual results:
Can't open user config file /root/.cephmeddic.conf: No such file or directory
Host: magna118.ceph.redhat.com  connection: [failed     ]                       
Can't open user config file /root/.cephmeddic.conf: No such file or directory
Host: magna118.ceph.redhat.com  connection: [failed     ]                      
Can't open user config file /root/.cephmeddic.conf: No such file or directory
Host: magna101.ceph.redhat.com  connection: [failed     ]                      
Can't open user config file /root/.cephmeddic.conf: No such file or directory
Host: magna102.ceph.redhat.com  connection: [failed     ]                      
Can't open user config file /root/.cephmeddic.conf: No such file or directory
Host: magna114.ceph.redhat.com  connection: [failed     ]                      
Can't open user config file /root/.cephmeddic.conf: No such file or directory
Host: magna004.ceph.redhat.com  connection: [failed     ]                      
Can't open user config file /root/.cephmeddic.conf: No such file or directory
Host: magna118.ceph.redhat.com  connection: [failed     ]                      
Collection failed!                                                                      
--> RuntimeError: All nodes failed to connect. Cannot run any checks


Expected results:
user friendly error message

Additional info:

Comment 2 Christina Meno 2017-09-11 18:01:38 UTC
Can't open user config file /root/.cephmeddic.conf: No such file or directory

and 

--> RuntimeError: All nodes failed to connect. Cannot run any checks

seem pretty descriptive and readable to me
Would you please suggest how it could be improved?

Comment 3 Shreekar 2017-09-12 05:41:06 UTC
Hi Gregory, --ssh-config is an option if configuration is changed, will specify the path to the config. By default, config will be there,so If specified while running checks,it is returning error. If the error message is user friendly,that would be nice.

Comment 4 Alfredo Deza 2017-09-12 12:55:58 UTC
(In reply to Shreekar from comment #3)
> Hi Gregory, --ssh-config is an option if configuration is changed, will
> specify the path to the config.

It wasn't clear from the description of this BZ that ceph-medic was being used with that flag. Could you confirm the exact flags you are using to trigger this behavior?

> By default, config will be there,so If
> specified while running checks,it is returning error. If the error message
> is user friendly,that would be nice.

How are you specifying this? What would a 'user friendly error message' be like in this context? Could you elaborate a bit more?

Comment 5 Shreekar 2017-09-12 13:40:46 UTC
If I give invalid path to ssh_config, ie. 'ceph-medic --ssh-config /etc/ssh/ssh_config_123 check', I expect it to print error message as "/etc/ssh/ssh_config_123 check does not exist. Please provide valid ssh_config file" . This will help me to identify the issue faster.

Comment 9 errata-xmlrpc 2017-12-05 23:42:05 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-2017:3387


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