Bug 1480087 - In ceph-medic, few commands are not performing with both valid and invalid values ,as expected.
Summary: In ceph-medic, few commands are not performing with both valid and invalid va...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Medic
Version: 3.0
Hardware: Unspecified
OS: Linux
low
low
Target Milestone: rc
: 3.1
Assignee: Andrew Schoen
QA Contact: Andrew Schoen
Andrew Schoen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-10 06:34 UTC by Persona non grata
Modified: 2018-01-09 07:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-09 07:26:12 UTC
Embargoed:


Attachments (Terms of Use)

Description Persona non grata 2017-08-10 06:34:28 UTC
Description of problem:
CLI Validation:
While performing validations against ceph-medic, few commands did not run as expected and thrown errors which were not user friendly.

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

How reproducible: 
Always

Steps to Reproduce:
1) "ceph-medic --inventory <invalid path> --ssh-config <invalid path> check " ,this command is returning exception error, suppose to return proper error message
2)"ceph-medic --inventory /path/to/hosts --ssh-config <invalid path>&<valid path> check", for both checks, it is showing same error(Collection failed!                                                                      
--> RuntimeError: All nodes failed to connect. Cannot run any checks). Suppose to get proper message.
3) "ceph-medic --inventory /path/to/hosts --ssh-config /path/to/ssh_config", If it's run without "check", not returning any error messages.Should display error message.
4)"ceph-medic --invendffdtory /path/to/hosts --ssh-confffig /path/to/ssh_config checck", for misspelled options, should return more proper message.

Actual results:
Incorrect error messages

Expected results:
User friendly error messages

Comment 2 Alfredo Deza 2017-08-10 15:37:25 UTC
Please include a copy of all tracebacks found for this issue.

Also, please create separate BZs for each of the issues found, otherwise it is hard to track and correlate fixes to BZs

Comment 3 Ian Colle 2017-08-15 17:32:46 UTC
Shreekar, can you please see Alfredo's request above and split this into separate bz's with tracebacks included as appropriate?

Comment 4 Persona non grata 2017-08-28 11:21:37 UTC
Hi, sorry for late response. Here are the tracebacks.
"ceph-medic --inventory <invalid path> --ssh-config <valid path> check "
Traceback (most recent call last):
  File "/usr/bin/ceph-medic", line 6, in <module>
    main.Medic()
  File "/usr/lib/python2.7/dist-packages/ceph_medic/main.py", line 44, in __init__
    self.main(argv)
  File "/usr/lib/python2.7/dist-packages/ceph_medic/decorators.py", line 45, in newfunc
    return f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/ceph_medic/main.py", line 120, in main
    ceph_medic.config.get('--inventory', self.hosts_file)))
  File "/usr/lib/python2.7/dist-packages/ceph_medic/util/configuration.py", line 106, in load_hosts
    return AnsibleInventoryParser(_path)
  File "/usr/lib/python2.7/dist-packages/ceph_medic/util/configuration.py", line 280, in __init__
    with open(filename, 'r') as fh:
IOError: [Errno 2] No such file or directory: '/etc/ansible/hostss'

Comment 5 Persona non grata 2017-08-28 11:22:46 UTC
"ceph-medic --inventory /path/to/hosts --ssh-config <invalid path>&<valid path> check"==
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

Comment 6 Persona non grata 2017-08-28 11:23:23 UTC
"ceph-medic --invendffdtory /path/to/hosts --ssh-confffig /path/to/ssh_config checck", for misspelled options 
Unknown command(s):

Comment 7 Alfredo Deza 2017-08-28 11:35:48 UTC
Shreekar, thank you for the added information. To better track the changes needed to address these, please open separate BZs against the problems found. 

Do link them back to this ticket so we can find them when you do.


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