yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #04916
[Bug 1221331] Re: keystone returns 'NoneType' object is unsubscriptable
There's no reason to avoid changing the status of a bug if it's known to
be inaccurate. Discussion can still occur here and the permalink will
work either way.
I assume Adam is correct... you can workaround an old package by simply
installing the latest version of keystoneclient from pypi:
> pip install python-keystoneclient
https://pypi.python.org/pypi/python-keystoneclient/
The latest client should be compatible with much older releases of
keystone.
** Changed in: python-keystoneclient
Status: New => Invalid
** Changed in: keystone
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1221331
Title:
keystone returns 'NoneType' object is unsubscriptable
Status in OpenStack Identity (Keystone):
Invalid
Status in Python client library for Keystone:
Invalid
Bug description:
I am trying to install the RDO OpenStack distribution on a RHEL 6.4 system. The install is failing during keystone configuration as follows:
^[[1;35merr: /Stage[main]/Cinder::Keystone::Auth/Keystone_service[cinder]: Could not evaluate: Execution of '/usr/bin/keystone --endpoint http://127.0.0.1:35357/v2.0/ service-list' returned 1: 'NoneType' object is unsubscriptable
Running this command interactively produces the same error:
# brutus1 /etc/keystone > export OS_SERVICE_TOKEN=49c056f8688540fcb933cf7335537676
# brutus1 /etc/keystone > export OS_SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0
# brutus1 /etc/keystone > keystone service-list
'NoneType' object is unsubscriptable
The keystone service appears to be running and connected to the mysql database:
# brutus1 /root > ps -ef|grep keystone
keystone 8451 1 0 17:20 ? 00:00:00 /usr/bin/python /usr/bin/keystone-all --config-file /etc/keystone/keystone.conf
# brutus1 /root > lsof -i|grep keystone
keystone- 8451 keystone 4u IPv4 21614 0t0 TCP *:35357 (LISTEN)
keystone- 8451 keystone 6u IPv4 21616 0t0 TCP *:commplex-main (LISTEN)
keystone- 8451 keystone 8u IPv4 21961 0t0 TCP ebrutus1:54531->ebrutus1:mysql (ESTABLISHED)
The keystone mysql database appears to have been properly initialized:
mysql> use keystone;
Database changed
mysql> show tables;
+------------------------+
| Tables_in_keystone |
+------------------------+
| credential |
| domain |
| ec2_credential |
| endpoint |
| group |
| group_domain_metadata |
| group_project_metadata |
| migrate_version |
| policy |
| project |
| role |
| service |
| token |
| trust |
| trust_role |
| user |
| user_domain_metadata |
| user_group_membership |
| user_project_metadata |
+------------------------+
19 rows in set (0.00 sec)
mysql> select * from service;
Empty set (0.00 sec)
I cranked up the debug level in the keystone log file and here is what I see:
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] ******************** REQUEST ENVIRON ********************
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] SCRIPT_NAME = /v2.0
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] webob.adhoc_attrs = {'response': <Response at 0x2373510 200 OK>}
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] REQUEST_METHOD = GET
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] PATH_INFO = /OS-KSADM/services
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] SERVER_PROTOCOL = HTTP/1.0
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] HTTP_X_AUTH_TOKEN = 49c056f8688540fcb933cf7335537676
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] HTTP_USER_AGENT = python-keystoneclient
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] eventlet.posthooks = []
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] SERVER_NAME = 127.0.0.1
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] REMOTE_ADDR = 127.0.0.1
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] eventlet.input = <eventlet.wsgi.Input object at 0x236b8d0>
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] wsgi.url_scheme = http
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] SERVER_PORT = 35357
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] wsgi.input = <eventlet.wsgi.Input object at 0x236b8d0>
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] HTTP_HOST = 127.0.0.1:35357
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] wsgi.multithread = True
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] HTTP_ACCEPT = */*
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] wsgi.version = (1, 0)
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] openstack.context = {'token_id': '49c056f8688540fcb933cf7335537676', 'is_admin': True}
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] GATEWAY_INTERFACE = CGI/1.1
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] wsgi.run_once = False
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] wsgi.errors = <open file '<stderr>', mode 'w' at 0x2aaaaaae81e0>
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] wsgi.multiprocess = False
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] CONTENT_TYPE = text/plain
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] HTTP_ACCEPT_ENCODING = identity, deflate, compress, gzip
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi]
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] ******************** REQUEST BODY ********************
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi]
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] arg_dict: {}
2013-09-04 17:37:48 INFO [sqlalchemy.engine.base.Engine] SELECT service.id AS service_id, service.type AS service_type, service.extra AS service_extra
FROM service
2013-09-04 17:37:48 INFO [sqlalchemy.engine.base.Engine] ()
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] ******************** RESPONSE HEADERS ********************
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] Vary = X-Auth-Token
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] Content-Type = application/json
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] Content-Length = 25
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi]
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] ******************** RESPONSE BODY ********************
2013-09-04 17:37:48 DEBUG [keystone.common.wsgi] {"OS-KSADM:services": []}
2013-09-04 17:37:48 INFO [access] 127.0.0.1 - - [05/Sep/2013:00:37:48 +0000] "GET http://127.0.0.1:35357/v2.0/OS-KSADM/services HTTP/1.0" 200 25
2013-09-04 17:37:48 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [04/Sep/2013 17:37:48] "GET /v2.0/OS-KSADM/services HTTP/1.1" 200 153 0.008193
Next I completely wiped out the RDO installation and reinstalled with
the same result.
I reported this to the Openstack mailing list and got back a response from Sean McCully asking me to try curl, which I did successfully as follows:
# brutus1 /root > curl -X POST -H "X-Auth-Token: 49c056f8688540fcb933cf7335537676" -H "Content-type: application/json" --data '{"OS-KSADM:service": {"name":"Test","type":"test","extra":"{}"}}' http://0.0.0.0:35357/v2.0/OS-KSADM/services
{"OS-KSADM:service": {"type": "test", "name": "Test", "id": "6d54ea4d2752435aba19893a9de24695"}}
# brutus1 /root > curl -X GET -H "X-Auth-Token: 49c056f8688540fcb933cf7335537676" http://0.0.0.0:35357/v2.0/OS-KSADM/services
{"OS-KSADM:services": [{"type": "test", "name": "Test", "id": "6d54ea4d2752435aba19893a9de24695"}]}
But access via the keystone client still fails with the same error:
# brutus1 /root > keystone service-list
'NoneType' object is unsubscriptable
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1221331/+subscriptions