[Openstack] Re: 回复: is this a bug in milestone-proposed keystone ? (cannotget endpoint-list, nor create endpoint)
.。o 0 O泡泡
501640144 at qq.com
Tue Mar 27 06:51:29 UTC 2012
Yes ,when in option:
[catalog]
driver = keystone.catalog.backends.sql.Catalog
the endpoint-create command can work..
but when I enter the command :
curl http://localhost:5000/v2.0/ or http://localhost:35357/v2.0/
It returns :
<error xmlns="http://docs.openstack.org/identity/api/v2.0" message="An unexpected error prevented the server from fulfilling your request. unsupported format character 't' (0x74) at index 33"code="500" title="Internal Server Error"/>
It seems something wrong with mysql database setting..
So I try to do kenystone-manage db_sync but it dose not work at all..
what should I do to make it work??
(I am wondering if the endpoints in keystone database endpoint table must be the same as what is in default_catalog.templates)
thanks
dming
------------------ 原始邮件 ------------------
发件人: "Dolph Mathews"<dolph.mathews at gmail.com>;
发送时间: 2012年3月26日(星期一) 晚上11:43
收件人: "Mandar Vaze"<mandar.vaze at vertex.co.in>;
抄送: ".。o 0 O泡泡"<501640144 at qq.com>; "Andiabes"<andi.abes at gmail.com>; "openstack"<openstack at lists.launchpad.net>;
主题: Re: [Openstack] 回复: is this a bug in milestone-proposed keystone ? (cannotget endpoint-list, nor create endpoint)
( This is significant gap in the current keystone docs, so I'll be ensuring this makes it into the docs ASAP; feedback here is very much appreciated! )
There are two driver options for your service catalog - one based on a flat file, and one backed by SQL. The flat file does not support administration commands from the client (e.g. keystone endpoint-create, keystone service-create), hence the HTTP 501 Not Implemented messages.
[catalog]
driver = keystone.catalog.backends.templated.TemplatedCatalog
template_file = /opt/stack/keystone/etc/default_catalog.templates
[catalog]
driver = keystone.catalog.backends.sql.Catalog
The `template_file` does not need to be defined for the sql.Catalog driver.
If you're installing from source, the templated.TemplatedCatalog is currently the default option (I could see this switching to SQL in the future, however). I believe Ubuntu and Debian packages default to the sql.Catalog.
To build a flat-file service catalog based on an existing diablo deployment: http://keystone.openstack.org/configuration.html#migrating-your-service-catalog-from-legacy-versions-of-keystone
To build a flat-file service catalog from scratch, refer to examples in keystone and devstack:
https://github.com/openstack/keystone/blob/master/etc/default_catalog.templates
https://github.com/openstack-dev/devstack/blob/master/files/default_catalog.templates
To build your service catalog using SQL, see the built-in help:
$ keystone
$ keystone | grep service
$ keystone help service-create
$ keystone help endpoint-create
-Dolph
2012/3/26 Mandar Vaze <mandar.vaze at vertex.co.in>
From and To look identical.
What should the [catalog] value be changed to ?
-Mandar
From: openstack-bounces+mandar.vaze=vertex.co.in at lists.launchpad.net [mailto:openstack-bounces+mandar.vaze=vertex.co.in at lists.launchpad.net] On Behalf Of .?o 0 O??
Sent: Monday, March 26, 2012 6:02 PM
To: Andiabes
Cc: openstack
Subject: [Openstack] 回复: is this a bug in milestone-proposed keystone ? (cannotget endpoint-list, nor create endpoint)
found the solution:
in keystone.conf
you need to change :
[catalog]
driver = keystone.catalog.backends.templated.TemplatedCatalog
to:
[catalog]
driver = keystone.catalog.backends.templated.TemplatedCatalog
------------------ 原始邮件 ------------------
发件人: "Andiabes"<andi.abes at gmail.com>;
发送时间: 2012年3月26日(星期一) 晚上7:25
收件人: "Mandar Vaze"<mandar.vaze at vertex.co.in>;
抄送: " .。o 0 O泡泡 "<501640144 at qq.com>; "Pierre Amadio"<pierre.amadio at canonical.com>; "openstack"<openstack at lists.launchpad.net>;
主题: Re: [Openstack] is this a bug in milestone-proposed keystone ? (cannotget endpoint-list, nor create endpoint)
Can you include your config?
The behavior you're describing seems to be consistent with a missing backers configuration ...
Something like:
[identity]
driver = keystone.identity.backends.sql.Identity
[catalog]
driver = keystone.catalog.backends.sql.Catalog
Also, where/how are you installing?
On Mar 26, 2012, at 6:56 AM, Mandar Vaze <mandar.vaze at vertex.co.in> wrote:
I’m also getting the same error on latest master branch (updated today)
Using setup created by devstack
-Mandar
From: openstack-bounces+mandar.vaze=vertex.co.in at lists.launchpad.net [mailto:openstack-bounces+mandar.vaze=vertex.co.in at lists.launchpad.net] On Behalf Of .?o 0 O??
Sent: Monday, March 26, 2012 12:45 PM
To: Pierre Amadio
Cc: openstack
Subject: Re: [Openstack] is this a bug in milestone-proposed keystone ? (cannotget endpoint-list, nor create endpoint)
hi,
I don't know if it is a bug but I come across the same problem and wondering how to solve it.
------------------ Original ------------------
From: "Pierre Amadio"<pierre.amadio at canonical.com>;
Date: Sun, Mar 25, 2012 04:35 AM
To: "openstack"<openstack at lists.launchpad.net>;
Subject: [Openstack] is this a bug in milestone-proposed keystone ? (cannotget endpoint-list, nor create endpoint)
Hi there !
I wanted to give a try to the milestone-proposed branch of keystone and
got stuck quite fast.
I am not sure if i hit a bug and should report it, or if i'm doing
something wrong.
With previous version of keystone (read packaged on ubuntu precise), i
was able to create endpoint the following way once keystone has been
installed:
1) setting some env variables:
export KEYSTONE_IP=192.168.122.102 # IP of your keystone API server
export SERVICE_ENDPOINT=http://$KEYSTONE_IP:35357/v2.0/
export SERVICE_TOKEN=999888777666
export NOVA_PUBLIC_URL="http://$NOVA_IP:8774/v1.1/%(tenant_id)s"
export NOVA_ADMIN_URL=$NOVA_PUBLIC_URL
export NOVA_INTERNAL_URL=$NOVA_PUBLIC_URL
2) creating services:
keystone service-create --name nova --type compute --description
'OpenStack Compute Service'
keystone service-create --name swift --type object-store --description
'OpenStack Storage Service'
keystone service-create --name glance --type image --description
'OpenStack Image Service'
keystone service-create --name keystone --type identity --description
'OpenStack Identity Service'
3) creating an endpoint for those services, starting with the compute
service:
ID=$(keystone service-list | grep -i compute | awk '{print $2}')
keystone endpoint-create --region RegionOne --service_id $ID --publicurl
$NOVA_PUBLIC_URL --adminurl $NOVA_ADMIN_URL --internalurl $NOVA_INTERNAL_URL
When i run this command with milestone-proposed, i experience the following:
No handlers could be found for logger "keystoneclient.client"
The action you have requested has not been implemented. (HTTP 501)
Strangely enough, i experience a similar error message when running a
simple "keystone endpoint-list" whereas command such as "keystone
user-list" works all right.
here is what i have in the keystone logs when trying "endpoint-list":
2012-03-24 20:30:09 DEBUG [routes.middleware] Matched GET /endpoints
2012-03-24 20:30:09 DEBUG [routes.middleware] Route path:
'{path_info:.*}', defaults: {'controller':
<keystone.contrib.admin_crud.core.CrudExtension object at 0x2b215d0>}
2012-03-24 20:30:09 DEBUG [routes.middleware] Match dict:
{'controller': <keystone.contrib.admin_crud.core.CrudExtension object at
0x2b215d0>, 'path_info': '/endpoints'}
2012-03-24 20:30:09 DEBUG [routes.middleware] Matched GET /endpoints
2012-03-24 20:30:09 DEBUG [routes.middleware] Route path:
'/endpoints', defaults: {'action': u'get_endpoints', 'controller':
<keystone.catalog.core.EndpointController object at 0x2b21210>}
2012-03-24 20:30:09 DEBUG [routes.middleware] Match dict: {'action':
u'get_endpoints', 'controller':
<keystone.catalog.core.EndpointController object at 0x2b21210>}
2012-03-24 20:30:09 DEBUG [keystone.common.wsgi] arg_dict: {}
2012-03-24 20:30:09 WARNING [keystone.common.wsgi] The action you have
requested has not been implemented.
2012-03-24 20:30:09 DEBUG [keystone.common.wsgi] ********************
RESPONSE HEADERS ********************
2012-03-24 20:30:09 DEBUG [keystone.common.wsgi] Content-Type =
application/json
2012-03-24 20:30:09 DEBUG [keystone.common.wsgi] Vary = X-Auth-Token
2012-03-24 20:30:09 DEBUG [keystone.common.wsgi] Content-Length = 109
2012-03-24 20:30:09 DEBUG [keystone.common.wsgi]
2012-03-24 20:30:09 DEBUG [keystone.common.wsgi] ********************
RESPONSE BODY ********************
I try to add some debug in
keystone.catalog.core.EndpointController.get_endpoints() method:
def get_endpoints(self, context):
LOG.debug("PLOP get_endpoints")
self.assert_admin(context)
LOG.debug("PLOP STILL HERE") # <= LAST DEBUG LINE
endpoint_list = self.catalog_api.list_endpoints(context)
LOG.debug("SO, how does endpoint_list looks like ?")
for i in endpoint_list:
LOG.debug("PLOP: '%s'",s)
endpoint_refs = [self.catalog_api.get_endpoint(context, e)
for e in endpoint_list]
LOG.debug("PLOP THIS IS THE END")
return {'endpoints': endpoint_refs}
So, as i do not see anything after "PLOP STILL HERE", i am assuming
something is wrong in the catalog_api.list_endpoints() method.
However, i do not understand exactly where it is implemented.
catalog_api is a Manager instance, wich seems to be a subclass of
Manager() defined in keystone/keystone/common/manager.py but i am lost
with the wrapping magic that occurs there.
So, is this a bug that i should file ?
_______________________________________________
Mailing list: https://launchpad.net/?openstack
Post to : openstack at lists.launchpad.net
Unsubscribe : https://launchpad.net/?openstack
More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack at lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack at lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120327/985aa566/attachment.html>
More information about the Openstack
mailing list