Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Glance api and Glance registry client version issue

I installed openstack HA newton release.. Iam using ceph for glance backend.. when I tried to launch an instance I found that in my glance-api.log it is using registry client as v1

2016-11-22 18:23:23.797 2824 WARNING keystonemiddleware.auth_token [-] Using the in-process token cache is deprecated as of the 4.2.0 release and may be removed in the 5.0.0 release or the 'O' development cycle. The in-process cache causes inconsistent results and high memory usage. When the feature is removed the auth_token middleware will not cache tokens by default which may result in performance issues. It is recommended to use  memcache for the auth_token token cache by setting the memcached_servers option.
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client [req-ca40aef3-c3be-4c12-a08c-486e4807d775 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] Registry client request GET /images/detail raised BadStatusLine
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client Traceback (most recent call last):
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 124, in do_request
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client     **kwargs)
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 70, in wrapped
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client     return func(self, *args, **kwargs)
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 373, in do_request
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client     headers=copy.deepcopy(headers))
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 87, in wrapped
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client     return func(self, method, url, body, headers)
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 507, in _do_request
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client     res = c.getresponse()
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client     response.begin()
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/httplib.py", line 453, in begin
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client     version, status, reason = self._read_status()
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client     raise BadStatusLine(line)
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client BadStatusLine: ''
2016-11-22 18:23:35.415 2824 ERROR glance.registry.client.v1.client
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi [req-ca40aef3-c3be-4c12-a08c-486e4807d775 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] Caught error: ''
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi Traceback (most recent call last):
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 1113, in __call__
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     request, **action_args)
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 1152, in dispatch
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     return method(*args, **kwargs)
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 396, in detail
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     images = registry.get_images_detail(req.context, **params)
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 177, in get_images_detail
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     return c.get_images_detailed(**kwargs)
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 161, in get_images_detailed
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     res = self.do_request("GET", "/images/detail", params=params)
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 147, in do_request
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     'exc_name': exc_name})
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     self.force_reraise()
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     six.reraise(self.type_, self.value, self.tb)
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 124, in do_request
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     **kwargs)
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 70, in wrapped
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     return func(self, *args, **kwargs)
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 373, in do_request
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     headers=copy.deepcopy(headers))
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 87, in wrapped
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     return func(self, method, url, body, headers)
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 507, in _do_request
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     res = c.getresponse()
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     response.begin()
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/httplib.py", line 453, in begin
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     version, status, reason = self._read_status()
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi   File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi     raise BadStatusLine(line)
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi BadStatusLine: ''
2016-11-22 18:23:35.418 2824 ERROR glance.common.wsgi
2016-11-22 18:23:35.424 2824 INFO eventlet.wsgi.server [req-ca40aef3-c3be-4c12-a08c-486e4807d775 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] 172.30.160.7 - - [22/Nov/2016 18:23:35] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 500 341 11.629461

I found my galnce api is using version2 because it is only working properly when I used version 2 like below

glance --os-image-api-version 2 image-list
+--------------------------------------+----------------+
| ID                                   | Name           |
+--------------------------------------+----------------+
| 761f885c-68eb-4d93-a287-0eb93a37870a | cirros-0.3.4   |
| 3ea46599-1957-4b42-b512-b3982d021004 | vdcba_centos_7 |
+--------------------------------------+----------------+

When I user version 1 as below I got the same internal server error

glance --os-image-api-version 1 image-list
500 Internal Server Error
The server has either erred or is incapable of performing the requested operation.
    (HTTP 500)

How can I solve this issue because while launching instance it is using v1 instead of v2. Any help is really appreciated..