fuel-cli throws trace instead of error message

Bug #1373550 reported by Tomasz 'Zen' Napierala
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Fuel Python (Deprecated)

Bug Description

When using cli on master node and when api container is down, fuel-cli instead of pretty error message throws :
[root@fuel ~]# fuel provisioning --env-id 1 --default -d
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/pkg_resources.py", line 299, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/parser.py", line 18, in <module>
    from fuelclient.cli.actions import actions
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/actions/__init__.py", line 19, in <module>
    from fuelclient.cli.actions.deploy import DeployChangesAction
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/actions/deploy.py", line 16, in <module>
    from fuelclient.cli.actions.base import Action
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/actions/base.py", line 22, in <module>
    from fuelclient.client import APIClient
  File "/usr/lib/python2.6/site-packages/fuelclient/client.py", line 190, in <module>
    APIClient = Client()
  File "/usr/lib/python2.6/site-packages/fuelclient/client.py", line 60, in __init__
    self.auth_status()
  File "/usr/lib/python2.6/site-packages/fuelclient/client.py", line 83, in auth_status
    request = urllib2.urlopen(''.join([self.api_root, 'version']))
  File "/usr/lib64/python2.6/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib64/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
    '_open', req)
  File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>

Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
milestone: none → 6.0
importance: Undecided → Medium
Changed in fuel:
status: New → Confirmed
Revision history for this message
Sebastian Kalinowski (prmtl) wrote :

https://review.openstack.org/#/c/107357/ introduced nice error message:

[root@fuel ~]# dockerctl stop nginx
[root@fuel ~]# fuel provisioning --env-id 1 --default

            Can't connect to Nailgun server!
            Please modify "SERVER_ADDRESS" and "LISTEN_PORT"
            in the file /etc/fuel/client/config.yaml

Changed in fuel:
status: Confirmed → Fix Committed
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.