service catalog empty in curl tokens

Asked by Jo

I am running off devstack from git (Ubuntu-11.10). The foll. curl command to get tokens, returns empty service catalog. Is this a bug?

1. $ curl -d '{"auth": {"project": "demo", "passwordCredentials": {"username": "admin", "password": "nova"}}}' -H "Content-type: application/json" http://192.168.0.10:5000/v2.0/tokens

{"access": {"token": {"expires": "2012-03-30T17:57:25Z", "id": "cbcaa377b4204f7ebe91e2984d497f7a"}, "serviceCatalog": {}, "user": {"username": "admin", "roles_links": [], "id": "a22865b8fa664c21a0d24630b4ec2494", "roles": [], "name": "admin"}}}

2. The default_catalog.templates file has the foll. for each service:

catalog.RegionOne.identity.publicURL = http://192.168.0.10:$(public_port)s/v2.0
catalog.RegionOne.identity.adminURL = http://192.168.0.10:$(admin_port)s/v2.0
catalog.RegionOne.identity.internalURL = http://192.168.0.10:$(public_port)s/v2.0
catalog.RegionOne.identity.name = Identity Service
......
......

3. $ keystone catalog --service compute
'Client' object has no attribute 'service_catalog'

4. keystone.conf
 [DEFAULT]
bind_host = 0.0.0.0
public_port = 5000
admin_port = 35357
admin_token = nova
compute_port = 3000
verbose = True
debug = True
# commented out so devstack logs to stdout
# log_file = /opt/stack/keystone/keystone.log

# ================= Syslog Options ============================
# Send logs to syslog (/dev/log) instead of to file specified
# by `log-file`
use_syslog = False

# Facility to use. If unset defaults to LOG_USER.
# syslog_log_facility = LOG_LOCAL0

[sql]
connection = mysql://root:nova@localhost/keystone
idle_timeout = 30
min_pool_size = 5
max_pool_size = 10
pool_timeout = 200

[identity]
driver = keystone.identity.backends.sql.Identity

[catalog]
driver = keystone.catalog.backends.templated.TemplatedCatalog
template_file = /opt/stack/keystone/etc/default_catalog.templates

[token]
driver = keystone.token.backends.kvs.Token

[policy]
driver = keystone.policy.backends.rules.Policy

[ec2]
driver = keystone.contrib.ec2.backends.sql.Ec2
......
......

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Identity (keystone) Edit question
Assignee:
No assignee Edit question
Solved by:
Yaguang Tang
Solved:
Last query:
Last reply:
Revision history for this message
Best Yaguang Tang (heut2008) said :
#1

it is not a bug ,with tenant id in your request ,then you can get the catalog like this
curl -d '{"auth": {"project": "demo", "passwordCredentials": {"username": "admin", "password": "nova"},"tenantId":"youtenantiid"}}' -H "Content-type: application/json" http://192.168.0.10:5000/v2.0/tokens

Revision history for this message
Jo (jsrat10) said :
#2

Thank you Yaguang!

On Thu, Mar 29, 2012 at 7:45 PM, Yaguang Tang <
<email address hidden>> wrote:

> Your question #192094 on Keystone changed:
> https://answers.launchpad.net/keystone/+question/192094
>
> Status: Open => Answered
>
> Yaguang Tang proposed the following answer:
> it is not a bug ,with tenant id in your request ,then you can get the
> catalog like this
> curl -d '{"auth": {"project": "demo", "passwordCredentials": {"username":
> "admin", "password": "nova"},"tenantId":"youtenantiid"}}' -H "Content-type:
> application/json" http://192.168.0.10:5000/v2.0/tokens
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/keystone/+question/192094/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/keystone/+question/192094
>
> You received this question notification because you asked the question.
>

Revision history for this message
Jo (jsrat10) said :
#3

Thanks Yaguang Tang, that solved my question.