AttributeError: 'unicode' object has no attribute 'get'

Bug #1594795 reported by Turbo Fredriksson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

I'm getting this when running

  openstack flavor list

and many other commands. Running with --debug, I see:

  Making authentication request to http://control:35357/v3/auth/tokens
  "POST /v3/auth/tokens HTTP/1.1" 201 11701
  run(Namespace(all=False, columns=[], formatter='table', limit=None, long=False, marker=None, max_width=0, noindent=False, public=True, quote_mode='nonnumeric'))
  Instantiating compute client for VAPI Version Major: 2, Minor: 0
  Making authentication request to http://control:35357/v3/auth/tokens
  "POST /v3/auth/tokens HTTP/1.1" 201 11701
  REQ: curl -g -i -X GET http://10.0.4.1:8774/v2/1857a7b08b8046038005b98e8b238843/flavors/detail -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}226eb1000d0f69fb06823fefb599f559729e0969"
  Starting new HTTP connection (1): 10.0.4.1
  "GET /v2/1857a7b08b8046038005b98e8b238843/flavors/detail HTTP/1.1" 503 170
  RESP: [503] Content-Length: 170 Content-Type: application/json; charset=UTF-8 X-Compute-Request-Id: req-f296672e-afa4-455a-ab14-2d9749658521 Date: Tue, 21 Jun 2016 12:33:58 GMT Connection: keep-alive
  RESP BODY: {"message": "The server is currently unavailable. Please try again at a later time.<br /><br />\n\n\n", "code": "503 Service Unavailable", "title": "Service Unavailable"}

So it would be "nice" (!!) if it could actually SAY that - that it can't connect to the service! Not just some descriptive Python code error.

description: updated
Revision history for this message
Augustina Ragwitz (auggy) wrote :

Hi Turbo, I'm a little confused. Are you reporting a bug for the issue that is triggering the "unicode object has no attribute get" error or are you simply saying that that error itself is a bug and should be more descriptive? Either way, please provide detailed steps to reproduce this error so we can help you debug.

Changed in nova:
status: New → Incomplete
Revision history for this message
Turbo Fredriksson (turbo-bayour) wrote :

The latter. Finding out why something fails, should not require adding --debug and dig through large number of texts, which, if you're not fluent in Python, is not that much better.

The error should have been [something like]:

  The server is currently unavailable. Please try again at a later time.

This is already available in the message, just not shown to the user.

However, that is only marginally better than the original error message. It would be better to know WHAT server that's "currently unavailable". Without knowing in depth, grepping configs etc, etc, I have no idea what server/service is listening on the port mentioned ("8774" in this case).

So a better message should be:

  The Nova compute service is currently unavailable. Please try again at a later time.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
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.