← Back to team overview

openstack team mailing list archive

Re: glance add : 'utf8' codec can't decode byte 0x94

 

Yes, after recreating  the endpoints i see with #keystone endpoint-list
+----------------------------------+-----------+----------------------------------------------------+----------------------------------------------------+-------------------------------------------------+
|                id                |   region  |
publicurl                      |                    internalurl
        |                     adminurl                    |
+----------------------------------+-----------+----------------------------------------------------+----------------------------------------------------+-------------------------------------------------+
| 1d83efeb86cf46fe904da9fe0ec71417 | RegionOne |
http://cloudc1.mynet.org:9292/v1                    |
http://cloudc1.mynet.org:9292/v1                    |
http://cloudc1.mynet.org:9292/v1                 |
| 2f14e35c6b5c4758a35ec4a9d184e65b | RegionOne |
http://cloudc1.mynet.org:5000/v2.0                  |
http://cloudc1.mynet.org:5000/v2.0                  |
http://cloudc1.mynet.org:35357/v2.0              |
| 399616ad52d84c40acb9493e543e406e | RegionOne |
http://cloudc1.mynet.org:8774/v2.0/%(tenant_id)s    |
http://cloudc1.mynet.org:8774/v2.0/%(tenant_id)s    |
http://cloudc1.mynet.org:8774/v2.0/%(tenant_id)s |
| 81bbde36848f492aa22c6b23f0f1bd13 | RegionOne |
http://cloudc1.mynet.org:8888/v1/AUTH_%(tenant_id)s |
http://cloudc1.mynet.org:8888/v1/AUTH_%(tenant_id)s |
http://cloudc1.mynet.org:8888/v1                 |
| b38f657742724400aaef72559f931731 | RegionOne |
http://cloudc1.mynet.org:8776/v1/%(tenant_id)s      |
http://cloudc1.mynet.org:8776/v1/%(tenant_id)s      |
http://cloudc1.mynet.org:8776/v1/%(tenant_id)s   |
+----------------------------------+-----------+----------------------------------------------------+----------------------------------------------------+-------------------------------------------------+

then

glance --os_username="glance" --os_password="cloud"  --os_auth_url="
http://cloudc1.mynet.org:5000/v2.0/";    add name="tty-linux-kernel"
disk_format=aki container_format=aki <
/tmp/images/ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz

Uploading image 'tty-linux-kernel'
Failed to add image. Got error:
The request returned 500 Internal Server Error

The response body:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/eventlet/wsgi.py", line 382, in
handle_one_response
    result = self.application(self.environ, start_response)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line
147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line
208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 284,
in __call__
    response = req.get_response(self.application)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py",
line 1053, in get_response
    application, catch_exc_info=False)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py",
line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File
"/usr/lib/python2.6/site-packages/keystone/middleware/auth_token.py", line
176, in __call__
    return self.app(env, start_response)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line
147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line
208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 284,
in __call__
    response = req.get_response(self.application)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py",
line 1053, in get_response
    application, catch_exc_info=False)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py",
line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line
159, in __call__
    return resp(environ, start_response)
  File
"/usr/lib/python2.6/site-packages/Routes-1.12.3-py2.6.egg/routes/middleware.py",
line 131, in __call__
    response = self.app(environ, start_response)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line
159, in __call__
    return resp(environ, start_response)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line
147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line
208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 482,
in __call__
    request, **action_args)
  File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 499,
in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/glance/api/v1/images.py", line
603, in create
    image_meta = self._reserve(req, image_meta)
  File "/usr/lib/python2.6/site-packages/glance/api/v1/images.py", line
315, in _reserve
    image_meta = registry.add_image_metadata(req.context, image_meta)
  File "/usr/lib/python2.6/site-packages/glance/registry/__init__.py", line
145, in add_image_metadata
    return c.add_image(image_meta)
  File "/usr/lib/python2.6/site-packages/glance/registry/client.py", line
121, in add_image
    res = self.do_request("POST", "/images", body, headers=headers)
  File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 58,
in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/glance/common/client.py", line
420, in do_request
    headers=headers)
  File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 75,
in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.6/site-packages/glance/common/client.py", line
554, in _do_request
    raise exception.ServerError(body=res.read())
ServerError: The request returned 500 Internal Server Error

The response body:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/eventlet/wsgi.py", line 382, in
handle_one_response
    result = self.application(self.environ, start_response)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line
147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File
"/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line
208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 281,
in __call__
    response = self.process_request(req)
  File "/usr/lib/python2.6/site-packages/glance/common/context.py", line
112, in process_request
    raise exception.NotAuthenticated()
NotAuthenticated: You are not authenticated.


Note: Your image metadata may still be in the registry, but the image's
status will likely be 'killed'.


On Thu, Nov 15, 2012 at 3:04 PM, Pádraig Brady <P@xxxxxxxxxxxxxx> wrote:

> On 11/15/2012 08:49 AM, G. Lekatsas wrote:
>
>> hello,
>>
>> sorry for the delay but after a restart i have to deal with another
>> problem and without being able to check the previous  "'utf8' codec" error.
>>
>
>     File "/usr/lib/python2.6/site-**packages/keystone/catalog/**backends/sql.py",
>> line 169, in get_catalog
>>      catalog[region][srv_type]['**internalURL'] = internal_url % d
>> TypeError: %d format: a number is required, not dict
>>
>
> You seem to have an invalid internalurl. I.E. one with %d... in it?
> You can see what's configured by running the following as the admin user:
>
>   keystone endpoint-list
>
> Any % there should be just used to reference dict items, for example:
>
>   %(tenant_id)s
>
> thanks,
> Pádraig.
>

References