Ask Your Question
1

why "openstack image list" not working (404)

asked 2015-03-11 12:59:19 -0500

Scott Zhang gravatar image

updated 2015-03-12 17:11:28 -0500

smaffulli gravatar image

Hello,

I am operating openstack on top of keystone api 3.0. So I use openstack client. I was able to run "openstack role list". However, if I run "openstack image list", I encountered a 404 error. Can someone give me any hint?

Please find my running script with debug mode as follow:

scott@ubuntu:~/devstack$ openstack image list --debug
/usr/local/lib/python2.7/dist-packages/novaclient/v1_1/__init__.py:30: UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module.
  warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
DEBUG: cliff.commandmanager found command 'security_group_create'
....
DEBUG: openstackclient.shell object_store API version 1, cmd group openstack.object_store.v1
DEBUG: cliff.commandmanager found command 'extension_list'
DEBUG: cliff.commandmanager found command 'quota_set'
DEBUG: cliff.commandmanager found command 'quota_show'
DEBUG: cliff.commandmanager found command 'limits_show'
DEBUG: openstackclient.api.auth Auth plugin token_endpoint selected
DEBUG: openstackclient.api.auth auth_type: token_endpoint
DEBUG: openstackclient.api.auth fetching option os_url
DEBUG: openstackclient.api.auth fetching option os_token
INFO: openstackclient.common.clientmanager Using auth plugin: token_endpoint
INFO: openstackclient.shell command: <none> -> openstackclient.image.v1.image.ListImage
DEBUG: openstackclient.image.v1.image.ListImage take_action(Namespace(columns=[], formatter='table', long=False, max_width=0, page_size=None, quote_mode='nonnumeric'))
DEBUG: openstackclient.image.client Instantiating image client: <class 'openstackclient.image.client.Client_v1'>
DEBUG: openstackclient.common.clientmanager Get auth_ref
DEBUG: glanceclient.common.http curl -g -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate, compress' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}5cf876cbfebc49f73d2d90cf1900fcd0ef304f20' http://172.16.152.166:5000/v1/images/detail?limit=20
DEBUG: urllib3.util.retry Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=0)
INFO: urllib3.connectionpool Starting new HTTP connection (1): 172.16.152.166
DEBUG: urllib3.connectionpool "GET /v1/images/detail?limit=20 HTTP/1.1" 404 93
DEBUG: glanceclient.common.http Request returned failure status 404.
ERROR: openstack The resource could not be found. (HTTP 404)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 303, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 92, in run
    self.produce_output(parsed_args, column_names, data)
  File "/usr/local/lib/python2.7/dist-packages/cliff/lister.py", line 56, in produce_output
    parsed_args,
  File "/usr/local/lib/python2.7/dist-packages/cliff/formatters/table.py", line 44, in emit_list
    first_row = next(data_iter)
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/image/v1/image.py", line 327, in <genexpr>
    return (columns, (utils.get_item_properties(s, columns) for s in data))
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 198, in paginate
    images, resp = self._list(url, "images")
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 63, in _list
    resp, body = self.client.get(url)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 262, in get
    return self._request('GET', url ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-03-12 15:26:15 -0500

Have you tried using the Python CLI's to see if the same response was returned. It looks like you are getting some deprecated errors so I recommend using a curl command, another cli, or just jumping into the database.

nova image-list 
glance image-list

http://docs.openstack.org/user-guide/...

[root@node-1 ~]# mysql -e 'use glance;select * from images;'
+--------------------------------------+--------+----------+--------+-----------+---------------------+---------------------+------------+---------+-------------+------------------+----------------------------------+----------------------------------+----------+---------+-----------+--------------+
| id                                   | name   | size     | status | is_public | created_at          | updated_at          | deleted_at | deleted | disk_format | container_format | checksum                         | owner                            | min_disk | min_ram | protected | virtual_size |
+--------------------------------------+--------+----------+--------+-----------+---------------------+---------------------+------------+---------+-------------+------------------+----------------------------------+----------------------------------+----------+---------+-----------+--------------+
| 22486b7f-8c97-4468-86e0-7e9e36815323 | TestVM | 13167616 | active |         1 | 2015-02-20 21:50:04 | 2015-02-20 22:02:38 | NULL       |       0 | qcow2       | bare             | 64d7c1cd2b6f60c92c14662941cb7913 | adce2366eb7d4583bf82a8f445c904c4 |        0 |      64 |         0 |         NULL |
+--------------------------------------+--------+----------+--------+-----------+---------------------+---------------------+------------+---------+-------------+------------------+----------------------------------+----------------------------------+----------+---------+-----------+--------------+
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: 2015-03-11 12:59:19 -0500

Seen: 1,256 times

Last updated: Mar 12 '15