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
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
Shreekar, can you please see Alfredo's request above and split this into separate bz's with tracebacks included as appropriate?
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'
"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
"ceph-medic --invendffdtory /path/to/hosts --ssh-confffig /path/to/ssh_config checck", for misspelled options Unknown command(s):
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.