Ask Your Question
0

Diablo-2 HTTP queries

asked 2011-07-12 20:04:28 -0500

aababilov gravatar image

I am using nova diablo-2. When I visit most of the tabs, I see an error message in browser and output on console like this:

DEBUG:django_openstack.api:admin_api connection created using token "0585230347f85d8cb535fab274afd2fc31658e97" and url "http://127.0.0.1:8774/v1.1" (u'http://127.0.0.1:8774/v1.1/services?fresh=1310500858.41', 'GET') {'headers': {'User-Agent': 'python-openstack-compute/2.0a1', 'X-Auth-Token': u'0585230347f85d8cb535fab274afd2fc31658e97'}} ERROR:django_openstack.syspanel.views.instances:ApiException fetching service list in instance usage Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/django_openstack/syspanel/views/instances.py", line 84, in usage service_list = api.service_list(request) File "/usr/lib/python2.6/site-packages/django_openstack/api.py", line 378, in service_list return [Services(s) for s in admin_api(request).services.list()] File "/usr/lib/python2.6/site-packages/openstackx/admin/services.py", line 14, in list return self._list("/services", "services") File "/usr/lib/python2.6/site-packages/openstackx/api/base.py", line 27, in _list resp, body = self.api.connection.get(url) File "/usr/lib/python2.6/site-packages/openstackx/api/connection.py", line 78, in get return self._cs_request(url, 'GET', *kwargs) File "/usr/lib/python2.6/site-packages/openstackx/api/connection.py", line 63, in _cs_request *kwargs) File "/usr/lib/python2.6/site-packages/openstackx/api/connection.py", line 48, in request raise exceptions.from_response(resp, body) NotFound: 404 Not Found

The resource could not be found.

(HTTP 404)

The same error occurs with /v1.1/{extras,admin}/{flavors,images} and so on. I used telnet to send queries to nova-api running on localhost:8774.

Current dashboard uses openstackx to create HTTP queries. For example, openstackx/admin/flavors.py contains FlavorManager with functions like this: def list(self): """ Get a list of all flavors.

   :rtype: list of :class:`Flavor`.
   """
   return self._list("/admin/flavors", "flavors")

Dashboard does HTTP GET on localhost:8774/v1.1/admin/flavors and has error 404. Here is telnet imitation of dashboard's querying.

telnet localhost 8774

Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /v1.1/admin/flavors HTTP/1.1 X-Auth-Token: 70a3d075-43a5-4825-a2e0-ca8497aa617c

HTTP/1.1 404 Not Found Content-Length: 52 Content-Type: text/plain; charset=UTF-8 Date: Tue, 12 Jul 2011 23:24:06 GMT

404 Not Found

The resource could not be found.

Connection closed by foreign host.

Here I have removed "admin/" from path:

telnet localhost 8774

Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /v1.1/flavors HTTP/1.1 X-Auth-Token: 70a3d075-43a5-4825-a2e0-ca8497aa617c

HTTP/1.1 200 OK Content-Type: application/json Content-Length: 1514 Date: Tue, 12 Jul 2011 23:21:12 GMT

{"flavors": [{"id": 3, "links": [{"href": "http://127.0.0.1:8774/v1.1/flavors/3", "rel": "self"}, {"href": "http://127.0.0.1:8774/v1.1/flavors/3", "type": "application/json", "rel": "bookmark"}, {"href": "http://127.0.0.1:8774/v1.1/flavors/3", "type": "application/xml", "rel": "bookmark"}], "name": "m1.medium"}, {"id": 4, "links": [{"href": "http://127.0.0.1:8774/v1.1/flavors/4", "rel": "self"}, {"href": "http://127 ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2011-07-13 05:19:03 -0500

aababilov gravatar image

Thank you very much!

edit flag offensive delete link more
0

answered 2011-07-12 21:13:44 -0500

The current version of the dashboard does not currently run with a vanilla distribution of nova.

The 404 errors you are receiving are due to using extensions provided by openstackx that have not been injected into the nova service.

I haven't tried running the dashboard against a vanilla nova since the project moved to github. The cloudbuilders openstack dev environment script applies the following flag to the nova service to include the extensions from openstackx:

--osapi_extensions_path=/path/to/openstackx/extensions"

If you're interested in running a purely development environment, the nova.sh script found here:

https://raw.github.com/cloudbuilders/deploy.sh/master/nova.sh (https://raw.github.com/cloudbuilders/...)

Sets up an openstack all-in-one box with nova, glance, keystone ready for development. If you're looking for a more production ready environment, that script should be helpful in finding the options you'll need to get an openstack environment running that the dashboard can interact with.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-07-12 20:04:28 -0500

Seen: 64 times

Last updated: Jul 13 '11