"coercing to Unicode"

asked 2012-11-28 06:53:01 -0600

yury+t gravatar image

I'm getting an unauthorized 401 code when trying to run nova image-list The immediate cause is a "coercing to Unicode... NoneType found" in Keystone call stack. The cause for that AFAIU is that in File "/p/os/identity/keystone/policy/backends/rules.py", line 110, in enforce enforce(credentials, action, target) the target has empty value ({}). The debug output will follow in separate post.

I guess I have misconfigured something subtly but what? I can get all types of Keystone lists, images upload in Glance, and all Nova services show fine.

The Keystone/etc. is 2012.2 for what it's worth.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2012-11-28 06:54:59 -0600

yury+t gravatar image

The additional line with "!!!" which isn't printed in out-of-the-box 2012.2 is the debug output I added:

2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] ***** REQUEST ENVIRON ***** 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] SCRIPT_NAME = /v2.0 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] webob.adhoc_attrs = {'respon se': <response at="" 0x1d1e410="" 200="" ok="">} 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] REQUEST_METHOD = GET 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] PATH_INFO = /tokens/13f2ade8 b4704e239f0e96284c903ea0 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] SERVER_PROTOCOL = HTTP/1.0 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] HTTP_X_AUTH_TOKEN = 1b32a05d 5a35446589c7867fc777376f 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] eventlet.posthooks = [] 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] SERVER_NAME = 127.0.0.1 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] REMOTE_ADDR = 127.0.0.1 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] eventlet.input = <eventlet.w sgi.input="" object="" at="" 0x1ba87d0=""> 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] wsgi.url_scheme = http 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] SERVER_PORT = 35357 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] wsgi.input = <eventlet.wsgi. input="" object="" at="" 0x1ba87d0=""> 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] openstack.context = {'token_ id': '1b32a05d5a35446589c7867fc777376f', 'is_admin': False} 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] HTTP_HOST = 127.0.0.1:35357 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] wsgi.multithread = True 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] HTTP_ACCEPT = application/js on 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] wsgi.version = (1, 0) 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] RAW_PATH_INFO = /v2.0/tokens /13f2ade8b4704e239f0e96284c903ea0 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] GATEWAY_INTERFACE = CGI/1.1 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] wsgi.run_once = False 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] wsgi.errors = <open file="" '<s="" tderr="">', mode 'w' at 0x7f63379911e0> 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] wsgi.multiprocess = False 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] CONTENT_TYPE = application/j son 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] HTTP_ACCEPT_ENCODING = ident ity 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] ***** REQUEST BODY ***** 2012-11-28 09:43:20 DEBUG [keystone.common.wsgi] 2012-11-28 09:43:20 DEBUG [routes.middleware] Matched GET /tokens/13f2ade8b47 04e239f0e96284c903ea0 2012-11-28 09:43:20 DEBUG [routes.middleware] Route path: '{path_info:.}', d efaults: {'controller': <keystone.contrib.ec2.core.ec2extension object="" at="" 0x1b8e="" 4d0="">} 2012-11-28 09:43:20 DEBUG [routes.middleware] Match dict: {'controller': <key stone.contrib.ec2.core.ec2extension="" object="" at="" 0x1b8e4d0="">, 'path_info': '/tokens/ 13f2ade8b4704e239f0e96284c903ea0'} 2012-11-28 09:43:20 DEBUG [routes.middleware] Matched GET /tokens/13f2ade8b47 04e239f0e96284c903ea0 2012-11-28 09:43:20 DEBUG [routes.middleware] Route path: '{path_info:.}', d efaults: {'controller': <keystone.contrib.s3.core.s3extension object="" at="" 0x1b1cf9="" 0="">} 2012-11-28 09:43:20 DEBUG [routes.middleware] Match dict: {'controller': <key stone.contrib.s3.core.s3extension="" object="" at="" 0x1b1cf90="">, 'path_info': '/tokens/13 f2ade8b4704e239f0e96284c903ea0'} 2012-11-28 09:43:20 DEBUG [routes.middleware] Matched GET /tokens/13f2ade8b47 04e239f0e96284c903ea0 2012-11-28 09:43:20 DEBUG [routes ... (more)

edit flag offensive delete link more
0

answered 2012-11-28 07:10:19 -0600

yury+t gravatar image

Sorry for the noise and disregard the question. The mistake was subtle, indeed, hehe -- the policy file was missing from keystone conf dir.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-11-28 06:53:01 -0600

Seen: 56 times

Last updated: Nov 28 '12