[nailgun][cli] Fuel CLI returns error not in user friendly view

Bug #1330429 reported by Egor Kotko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Andrey Tykhonov

Bug Description

{"build_id": "2014-06-16_00-31-15", "mirantis": "yes", "build_number": "255", "ostf_sha": "67b61ed3788297fa5d985afec32498d8c0f812db", "nailgun_sha": "984aa7a86487f1488c2f83c052904abd9f589b7f", "production": "docker", "api": "1.0", "fuelmain_sha": "6f355160366475d52050d7898a1080a95ecb9cbf", "astute_sha": "17b1afa5f0dc8f4fca5ed4eb03ec566fbfb5ed19", "release": "5.1", "fuellib_sha": "99d74172887ab81d38132655d6e5d180e8726437"}

Steps to reproduce:
1. Setup master node
2. Create environment (fuel env create --name=stambul --mode=ha --network-mode neutron --net-segment-type gre --rel=1)
3. Upload settings from non exists file:
#fuel settings --upload --dir /root/json_stambul --json --env 1

Actual result:
http://paste.openstack.org/show/84142/

Expected result:
Inform message without traceback.

The same about this commands:
fuel deployment --upload --dir /root/json_stambul/ --json --env 1
fuel net --upload --dir /root/json_stambul --json --env 1

Revision history for this message
Egor Kotko (ykotko) wrote :
Changed in fuel:
milestone: 5.0.1 → 5.1
assignee: nobody → Fuel Python Team (fuel-python)
importance: Low → Medium
Revision history for this message
Dima Shulyak (dshulyak) wrote :

IOError: [Errno 2] No such file or directory: '/root/json_stambul/settings_1.json'

I think this error is pretty descriptive

Dima Shulyak (dshulyak)
Changed in fuel:
importance: Medium → Wishlist
status: New → Invalid
Revision history for this message
Egor Kotko (ykotko) wrote :

Agree that last string is informative but why do we need all this? We are using fuel cli and need just information about mistakes in the command but not hall traceback.

Traceback (most recent call last):
  File "/usr/bin/fuel", line 9, in <module>
    load_entry_point('fuelclient==0.2', 'console_scripts', 'fuel')()
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/error.py", line 95, in wrapper
    handle_exceptions(exc)
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/error.py", line 93, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/parser.py", line 148, in main
    parser.parse()
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/parser.py", line 80, in parse
    actions[parsed_params.action].action_func(parsed_params)
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/actions/base.py", line 53, in action_func
    method(params)
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/actions/settings.py", line 51, in upload
    serializer=self.serializer
  File "/usr/lib/python2.6/site-packages/fuelclient/objects/environment.py", line 144, in read_settings_data
    settings_file_path)
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/serializers.py", line 81, in read_from_file
    with open(full_path, "r") as file_to_read:
IOError: [Errno 2] No such file or directory: '/root/json_stambul/settings_1.json'

Changed in fuel:
status: Invalid → Confirmed
Dmitry Ilyin (idv1985)
summary: - Fuel CLI returns error not in user friendly view
+ [nailgun][cli] Fuel CLI returns error not in user friendly view
Artem Roma (aroma-x)
tags: added: fuel-client
removed: cli
Changed in fuel:
milestone: 5.1 → 6.0
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 6.0 → 6.1
tags: added: low-hanging-fruit
Dmitry Pyzhov (dpyzhov)
tags: added: module-client
removed: fuel-client
Changed in fuel:
milestone: 6.1 → 7.0
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
importance: Wishlist → Low
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 7.0 → 8.0
Changed in fuel:
importance: Low → Medium
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Andrey Tykhonov (atykhonov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/227761

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (master)

Reviewed: https://review.openstack.org/227761
Committed: https://git.openstack.org/cgit/stackforge/python-fuelclient/commit/?id=f73a04275d3ba77452523b65177f29244d61a5bb
Submitter: Jenkins
Branch: master

commit f73a04275d3ba77452523b65177f29244d61a5bb
Author: Andrey Tykhonov <email address hidden>
Date: Thu Sep 24 18:20:40 2015 +0300

    Error message when specified directory is invalid

    Catch possible exceptions which relate to a situation when the
    directory (provided by a user) doesn't exist or the directory doesn't
    have sufficient permissions or when it is not directory at all. Catch
    these exceptions and display appropriate error messages.

    Closes-bug: #1330429
    Change-Id: I3551dc42e527d60a2d8b2040418b2594e08e3b09

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Revision history for this message
Anastasia Palkina (apalkina) wrote :

Verified on ISO #55 with liberty

"fuel-createmirror_sha": "d0364e7f8670faeeb1f59e110a3f68e3d2d7c83f", "api": "1.0", "fuelmain_sha": "d26eea511f0b90637e7d65cf1a93ca8b82502278", "astute_sha": "8c5c4dd8dd8cc0d512ea32f20fc63efd425737cd", "fuel-ostf_sha": "9f500668555292add5d87c942e0cd804aefa6df2", "openstack_version": "2015.1.0-8.0", "build_id": "55", "build_number": "55", "auth_required": false, "fuel-library_sha": "b9fccc093b7d4beaf68fa857e60e5b6357f2746b", "fuel-nailgun-agent_sha": "abab45cf8c7344d43acd3858c02d7a648ef7fee6", "fuel-nailgun_sha": "e6a4f84f00dbab286963bd8132c806cacbf7303a", "fuel-agent_sha": "49e2e8a08a3cf39d1b38ee155015332aa84e47fd", "production": "docker", "python-fuelclient_sha": "398b003a840e361c09b166f1a05e6c7bd92ba416", "feature_groups": ["mirantis"], "release": "8.0", "release_versions": {"2015.1.0-8.0": {"VERSION": {"fuel-createmirror_sha": "d0364e7f8670faeeb1f59e110a3f68e3d2d7c83f", "api": "1.0", "fuelmain_sha": "d26eea511f0b90637e7d65cf1a93ca8b82502278", "astute_sha": "8c5c4dd8dd8cc0d512ea32f20fc63efd425737cd", "fuel-ostf_sha": "9f500668555292add5d87c942e0cd804aefa6df2", "openstack_version": "2015.1.0-8.0", "build_id": "55", "build_number": "55", "fuel-library_sha": "b9fccc093b7d4beaf68fa857e60e5b6357f2746b", "fuel-nailgun-agent_sha": "abab45cf8c7344d43acd3858c02d7a648ef7fee6", "fuel-nailgun_sha": "e6a4f84f00dbab286963bd8132c806cacbf7303a", "fuel-agent_sha": "49e2e8a08a3cf39d1b38ee155015332aa84e47fd", "production": "docker", "python-fuelclient_sha": "398b003a840e361c09b166f1a05e6c7bd92ba416", "feature_groups": ["mirantis"], "release": "8.0"}}}

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.