Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenStack: Dev

Endpoints problems

 

 

OpenStack dev RSS feed   Index | Next | Previous | View Threaded


guibirk at hotmail

Apr 12, 2012, 10:25 AM

Post #1 of 23 (1174 views)
Permalink
Endpoints problems

I'm having problems setting up the nova endpoint. I've followed the manual http://docs.openstack.org/trunk/openstack-compute/install/content/setting-up-tenants-users-and-roles.html, putting the tenant id on the url's, like the manual says to do. But when I try execute "nova list" I got a malformed url error. When I set the endpoint without the tenant id on the url's I got a 404 error. Anyone having the same problem?

I can access the dashboard normally, but I'm unable to retrieve instance list.


anne at openstack

Apr 12, 2012, 1:28 PM

Post #2 of 23 (1168 views)
Permalink
Re: Endpoints problems [In reply to]

Hi Guilherme -
Sorry you ran into a doc bug -
https://bugs.launchpad.net/openstack-manuals/+bug/977905.

Basically, the bug states that the nova endpoint definition should be:

keystone --token 012345SECRET99TOKEN012345 --endpoint
http://192.168.206.130:35357/v2.0 endpoint-create \

--region RegionOne \
--service_id=abc0f03c02904c24abdcc3b7910e2eed \
--publicurl
http://192.168.206.130:8774/v2/$(tenant_id)s \
--adminurl
http://192.168.206.130:8774/v2/$(tenant_id)s \
--internalurl
http://192.168.206.130:8774/v2/$(tenant_id)s

I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
literal or which tenant_id specifically to use (the Service tenant for the
adminurl possibly)?

If someone on the list could offer more input here and on the doc bug it
would be greatly appreciated!
Anne

On Thu, Apr 12, 2012 at 12:25 PM, Guilherme Birk <guibirk [at] hotmail>wrote:

> I'm having problems setting up the nova endpoint. I've followed the
> manual
> http://docs.openstack.org/trunk/openstack-compute/install/content/setting-up-tenants-users-and-roles.html,
> putting the tenant id on the url's, like the manual says to do. But when I
> try execute "nova list" I got a malformed url error. When I set the
> endpoint without the tenant id on the url's I got a 404 error. Anyone
> having the same problem?
>
> I can access the dashboard normally, but I'm unable to retrieve instance
> list.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>


zaitcev at redhat

Apr 12, 2012, 3:44 PM

Post #3 of 23 (1166 views)
Permalink
Re: Endpoints problems [In reply to]

On Thu, 12 Apr 2012 15:28:21 -0500
Anne Gentle <anne [at] openstack> wrote:

> keystone --token 012345SECRET99TOKEN012345 --endpoint
> http://192.168.206.130:35357/v2.0 endpoint-create \
>[....]
> --internalurl
> http://192.168.206.130:8774/v2/$(tenant_id)s
>
> I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
> literal or which tenant_id specifically to use (the Service tenant for the
> adminurl possibly)?

The expression "$(tenant_id)s" is really contained inside the pattern
in the database. It is substituded with a specific tennant ID when
an application makes its request. The weird syntax is inherited from
Python, where one can use constructs like %s or %(key)s.

-- Pete

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


gongysh at cn

Apr 12, 2012, 5:11 PM

Post #4 of 23 (1204 views)
Permalink
Re: Endpoints problems [In reply to]

Maybe, here some codes are worth thouhands of words:
keystone.catalog.backends.sql.Catalog:
def get_catalog(self, user_id, tenant_id, metadata=None):
d = dict(CONF.iteritems())
d.update({'tenant_id': tenant_id,
'user_id': user_id})
catalog = {}

endpoints = [self.get_endpoint(e)
for e in self.list_endpoints()]
for ep in endpoints:
service = self.get_service(ep['service_id'])
srv_type = service['type']
srv_name = service['name']
region = ep['region']

if region not in catalog:
catalog[region] = {}

catalog[region][srv_type] = {}

internal_url = ep['internalurl'].replace('$(', '%(')
public_url = ep['publicurl'].replace('$(', '%(')
admin_url = ep['adminurl'].replace('$(', '%(')
catalog[region][srv_type]['name'] = srv_name
catalog[region][srv_type]['publicURL'] = public_url % d
catalog[region][srv_type]['adminURL'] = admin_url % d
catalog[region][srv_type]['internalURL'] = internal_url % d

return catalog



-----openstack-bounces+gongysh=cn.ibm.com [at] lists wrote: -----

To: Anne Gentle <anne [at] openstack>
From: Pete Zaitcev <zaitcev [at] redhat>
Sent by: openstack-bounces+gongysh=cn.ibm.com [at] lists
Date: 04/13/2012 06:44AM
Cc: Openstack Mail List <openstack [at] lists>
Subject: Re: [Openstack] Endpoints problems

On Thu, 12 Apr 2012 15:28:21 -0500
Anne Gentle <anne [at] openstack> wrote:

> keystone --token 012345SECRET99TOKEN012345 --endpoint
> http://192.168.206.130:35357/v2.0"]http://192.168.206.130:35357/v2.0 endpoint-create \
>[...]
> --internalurl
> http://192.168.206.130:8774/v2/$(tenant_id)s
>
> I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
> literal or which tenant_id specifically to use (the Service tenant for the
> adminurl possibly)?

The expression "$(tenant_id)s" is really contained inside the pattern
in the database. It is substituded with a specific tennant ID when
an application makes its request. The weird syntax is inherited from
Python, where one can use constructs like %s or %(key)s.

-- Pete

_______________________________________________
Mailing list: https://launchpad.net/%7Eopenstack"]https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/%7Eopenstack"]https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp"]https://help.launchpad.net/ListHelp




lorin at nimbisservices

Apr 12, 2012, 7:33 PM

Post #5 of 23 (1175 views)
Permalink
Re: Endpoints problems [In reply to]

On Apr 12, 2012, at 6:44 PM, Pete Zaitcev wrote:

> On Thu, 12 Apr 2012 15:28:21 -0500
> Anne Gentle <anne [at] openstack> wrote:
>
>> keystone --token 012345SECRET99TOKEN012345 --endpoint
>> http://192.168.206.130:35357/v2.0 endpoint-create \
>> [....]
>> --internalurl
>> http://192.168.206.130:8774/v2/$(tenant_id)s
>>
>> I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
>> literal or which tenant_id specifically to use (the Service tenant for the
>> adminurl possibly)?
>
> The expression "$(tenant_id)s" is really contained inside the pattern
> in the database. It is substituded with a specific tennant ID when
> an application makes its request. The weird syntax is inherited from
> Python, where one can use constructs like %s or %(key)s.


My understanding (based on somebody's previous answer in the mailing list, or possibly one of the IRC channels) was that you could only do this with the template backend, and when you were using the database backend you had to explicitly add endpoints for each tenant that needed to talk to the API.

Can you confirm that you can use the $(tenant_id)s syntax when the backend is set using the following keystone.conf entry:

[catalog]
driver = keystone.catalog.backends.sql.Catalog


Take care,

Lorin
--
Lorin Hochstein
Lead Architect - Cloud Services
Nimbis Services, Inc.
www.nimbisservices.com


zaitcev at redhat

Apr 12, 2012, 8:42 PM

Post #6 of 23 (1171 views)
Permalink
Re: Endpoints problems [In reply to]

On Thu, 12 Apr 2012 22:33:38 -0400
Lorin Hochstein <lorin [at] nimbisservices> wrote:

> My understanding (based on somebody's previous answer in the mailing list,
> or possibly one of the IRC channels) was that you could only do this with
> the template backend, and when you were using the database backend you had
> to explicitly add endpoints for each tenant that needed to talk to the API.
>
> Can you confirm that you can use the $(tenant_id)s syntax when the backend
> is set using the following keystone.conf entry:
>
> [catalog]
> driver = keystone.catalog.backends.sql.Catalog

The thought that the substitution may not work never occured to me.
I have the following in keystone.conf:

[catalog]
# dynamic, sql-based backend (supports API/CLI-based management commands)
driver = keystone.catalog.backends.sql.Catalog
template_file = /etc/keystone/default_catalog.templates

# static, file-based backend (does *NOT* support any management commands)
#driver = keystone.catalog.backends.templated.TemplatedCatalog
#template_file = ./etc/default_catalog.templates

And I run the following command as a part of re-population script:

## Without proxy:
#$keystone endpoint-create --region RegionOne --service_id $SSID \
# --publicurl 'http://kvm-rei.zaitcev.lan/v1/AUTH_$(tenant_id)s' \
# --adminurl 'http://kvm-rei.zaitcev.lan/v1.0/' \
# --internalurl 'http://kvm-rei.zaitcev.lan/v1/AUTH_$(tenant_id)s'
# With SSL proxy at kvm-san:
$keystone endpoint-create --region RegionOne --service_id $SSID \
--adminurl 'http://kvm-rei.zaitcev.lan/v1.0/' \
--publicurl 'https://kvm-san.zaitcev.lan/v1/AUTH_$(tenant_id)s' \
--internalurl 'http://kvm-rei.zaitcev.lan/v1/AUTH_$(tenant_id)s'

Everything seems to work. Also see Yong-Sheng's message about
the source code.

-- Pete

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


zaitcev at redhat

Apr 12, 2012, 8:45 PM

Post #7 of 23 (1167 views)
Permalink
Re: Endpoints problems [In reply to]

On Fri, 13 Apr 2012 08:11:28 +0800
Yong Sheng Gong <gongysh [at] cn> wrote:

> Maybe, here some codes are worth thouhands of words:

I quite agree. On the other hand, does Anne care to read it? She needs
a concise answer as to what command to document precisely, if I understad
her query right.

> d = dict(CONF.iteritems())
> d.update({'tenant_id': tenant_id,
> 'user_id': user_id})
> catalog = {}

It would be great if we kept track of available keys in a document
somewhere. Of course, the source is open. That's how I found my
forgotten 's'. But still, it's a hurdle to clear for some.

-- Pete

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


jshepher at rackspace

Apr 12, 2012, 9:24 PM

Post #8 of 23 (1173 views)
Permalink
Re: Endpoints problems [In reply to]

So looking at the code.. both templated and sql backends seem to support the variable substitution.

And if i am reading the code correctly they support both of the following variable declarations:

%(tennant_id)s
$(tennant_id)s

since it appears the code replaces "$(" with "%("

--shep
On Apr 12, 2012, at 9:33 PM, Lorin Hochstein wrote:


On Apr 12, 2012, at 6:44 PM, Pete Zaitcev wrote:

On Thu, 12 Apr 2012 15:28:21 -0500
Anne Gentle <anne [at] openstack<mailto:anne [at] openstack>> wrote:

keystone --token 012345SECRET99TOKEN012345 --endpoint
http://192.168.206.130:35357/v2.0 endpoint-create \
[....]
--internalurl
http://192.168.206.130:8774/v2/$(tenant_id)s

I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
literal or which tenant_id specifically to use (the Service tenant for the
adminurl possibly)?

The expression "$(tenant_id)s" is really contained inside the pattern
in the database. It is substituded with a specific tennant ID when
an application makes its request. The weird syntax is inherited from
Python, where one can use constructs like %s or %(key)s.

My understanding (based on somebody's previous answer in the mailing list, or possibly one of the IRC channels) was that you could only do this with the template backend, and when you were using the database backend you had to explicitly add endpoints for each tenant that needed to talk to the API.

Can you confirm that you can use the $(tenant_id)s syntax when the backend is set using the following keystone.conf entry:

[catalog]
driver = keystone.catalog.backends.sql.Catalog


Take care,

Lorin
--
Lorin Hochstein
Lead Architect - Cloud Services
Nimbis Services, Inc.
www.nimbisservices.com<https://www.nimbisservices.com/>




_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists<mailto:openstack [at] lists>
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


anne at openstack

Apr 12, 2012, 9:33 PM

Post #9 of 23 (1174 views)
Permalink
Re: Endpoints problems [In reply to]

Thanks all!

And thanks for not saying "It's a Python Thing You Wouldn't Understand." :)

Yeah I do want a definitive answer but it's always good for me to learn to
read code.

Then again, things like replace('$(', '%(') make me go hmm...

One last clarification, this $(tenant_id)s should be used for both nova and
volume endpoints, right?

Thanks,

Anne


On Thu, Apr 12, 2012 at 5:44 PM, Pete Zaitcev <zaitcev [at] redhat> wrote:

> On Thu, 12 Apr 2012 15:28:21 -0500
> Anne Gentle <anne [at] openstack> wrote:
>
> > keystone --token 012345SECRET99TOKEN012345 --endpoint
> > http://192.168.206.130:35357/v2.0 endpoint-create \
> >[....]
> > --internalurl
> > http://192.168.206.130:8774/v2/$(tenant_id)s
> >
> > I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
> > literal or which tenant_id specifically to use (the Service tenant for
> the
> > adminurl possibly)?
>
> The expression "$(tenant_id)s" is really contained inside the pattern
> in the database. It is substituded with a specific tennant ID when
> an application makes its request. The weird syntax is inherited from
> Python, where one can use constructs like %s or %(key)s.
>
> -- Pete
>


gongysh at cn

Apr 12, 2012, 9:57 PM

Post #10 of 23 (1226 views)
Permalink
Re: Endpoints problems [In reply to]

Here is one sample keystone default_catalog.templates which defines some services. In fact I think for SQL, we need use keystone client to add them into SQL DB.


# config for TemplatedCatalog, using camelCase because I don't want to do
# translations for keystone compat
catalog.RegionOne.identity.publicURL = http://controlnode:$(public_port)s/v2.0
catalog.RegionOne.identity.adminURL = http://controlnode:$(admin_port)s/v2.0
catalog.RegionOne.identity.internalURL = http://controlnode:$(public_port)s/v2.0
catalog.RegionOne.identity.name = Identity Service

# fake compute service for now to help novaclient tests work
catalog.RegionOne.compute.publicURL = http://controlnode:$(compute_port)s/v1.1/$(tenant_id)s
catalog.RegionOne.compute.adminURL = http://controlnode:$(compute_port)s/v1.1/$(tenant_id)s
catalog.RegionOne.compute.internalURL = http://controlnode:$(compute_port)s/v1.1/$(tenant_id)s
catalog.RegionOne.compute.name = Compute Service

catalog.RegionOne.volume.publicURL = http://controlnode:8776/v1/$(tenant_id)s
catalog.RegionOne.volume.adminURL = http://controlnode:8776/v1/$(tenant_id)s
catalog.RegionOne.volume.internalURL = http://controlnode:8776/v1/$(tenant_id)s
catalog.RegionOne.volume.name = Volume Service

catalog.RegionOne.ec2.publicURL = http://controlnode:8773/services/Cloud"]http://controlnode:8773/services/Cloud
catalog.RegionOne.ec2.adminURL = http://controlnode:8773/services/Admin"]http://controlnode:8773/services/Admin
catalog.RegionOne.ec2.internalURL = http://controlnode:8773/services/Cloud"]http://controlnode:8773/services/Cloud
catalog.RegionOne.ec2.name = EC2 Service

catalog.RegionOne.image.publicURL = http://controlnode:9292/v1"]http://controlnode:9292/v1
catalog.RegionOne.image.adminURL = http://controlnode:9292/v1"]http://controlnode:9292/v1
catalog.RegionOne.image.internalURL = http://controlnode:9292/v1"]http://controlnode:9292/v1
catalog.RegionOne.image.name = Image Service

-----openstack-bounces+gongysh=cn.ibm.com [at] lists wrote: -----

To: Pete Zaitcev <zaitcev [at] redhat>
From: Anne Gentle <anne [at] openstack>
Sent by: openstack-bounces+gongysh=cn.ibm.com [at] lists
Date: 04/13/2012 12:33PM
Cc: Openstack Mail List <openstack [at] lists>
Subject: Re: [Openstack] Endpoints problems

Thanks all!

And thanks for not saying "It's a Python Thing You Wouldn't Understand." :)

Yeah I do want a definitive answer but it's always good for me to learn to read code.

Then again, things like replace('$(', '%(') make me go hmm...

One last clarification, this $(tenant_id)s should be used for both nova and volume endpoints, right?

Thanks,

Anne


On Thu, Apr 12, 2012 at 5:44 PM, Pete Zaitcev <zaitcev [at] redhat> wrote:
On Thu, 12 Apr 2012 15:28:21 -0500
Anne Gentle <anne [at] openstack> wrote:

> keystone --token 012345SECRET99TOKEN012345 --endpoint
> http://192.168.206.130:35357/v2.0"]http://192.168.206.130:35357/v2.0 endpoint-create \
>[...]
> --internalurl
> http://192.168.206.130:8774/v2/$(tenant_id)s
>
> I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
> literal or which tenant_id specifically to use (the Service tenant for the
> adminurl possibly)?

The expression "$(tenant_id)s" is really contained inside the pattern
in the database. It is substituded with a specific tennant ID when
an application makes its request. The weird syntax is inherited from
Python, where one can use constructs like %s or %(key)s.

-- Pete

_______________________________________________
Mailing list: https://launchpad.net/%7Eopenstack"]https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/%7Eopenstack"]https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp"]https://help.launchpad.net/ListHelp



Atul.Jha at csscorp

Apr 12, 2012, 10:06 PM

Post #11 of 23 (1171 views)
Permalink
Re: Endpoints problems [In reply to]

Hi,
________________________________________
From: openstack-bounces+atul.jha=csscorp.com [at] lists [openstack-bounces+atul.jha=csscorp.com [at] lists] on behalf of Anne Gentle [anne [at] openstack]
Sent: Friday, April 13, 2012 10:03 AM
To: Pete Zaitcev
Cc: Openstack Mail List
Subject: Re: [Openstack] Endpoints problems

Thanks all!

And thanks for not saying "It's a Python Thing You Wouldn't Understand." :)

Yeah I do want a definitive answer but it's always good for me to learn to read code.

Then again, things like replace('$(', '%(') make me go hmm...

One last clarification, this $(tenant_id)s should be used for both nova and volume endpoints, right?

Yes.
Nova-volume and Swift as well.

Thanks,

Anne


On Thu, Apr 12, 2012 at 5:44 PM, Pete Zaitcev <zaitcev [at] redhat<mailto:zaitcev [at] redhat>> wrote:
On Thu, 12 Apr 2012 15:28:21 -0500
Anne Gentle <anne [at] openstack<mailto:anne [at] openstack>> wrote:

> keystone --token 012345SECRET99TOKEN012345 --endpoint
> http://192.168.206.130:35357/v2.0 endpoint-create \
>[....]
> --internalurl
> http://192.168.206.130:8774/v2/$(tenant_id)s<http://192.168.206.130:8774/v2/$%28tenant_id%29s>
>
> I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
> literal or which tenant_id specifically to use (the Service tenant for the
> adminurl possibly)?

The expression "$(tenant_id)s" is really contained inside the pattern
in the database. It is substituded with a specific tennant ID when
an application makes its request. The weird syntax is inherited from
Python, where one can use constructs like %s or %(key)s.

-- Pete

http://www.csscorp.com/common/email-disclaimer.php

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


zaitcev at redhat

Apr 12, 2012, 10:25 PM

Post #12 of 23 (1169 views)
Permalink
Re: Endpoints problems [In reply to]

On Fri, 13 Apr 2012 04:24:56 +0000
Justin Shepherd <jshepher [at] rackspace> wrote:

> And if i am reading the code correctly they support both of the following
> variable declarations:
>
> %(tennant_id)s
> $(tennant_id)s
>
> since it appears the code replaces "$(" with "%("

Exactly why documentation is important, since it codifies the
intent and not artefacts of implementation.

I only wish we had an implementation that left 's' for Python-like
%(key)s, and supported a Make-like $(key) without 's'. However, putting
it in post-Essex is going to break compatibility, so it's too late.

-- Pete

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


guibirk at hotmail

Apr 13, 2012, 6:28 AM

Post #13 of 23 (1171 views)
Permalink
Re: Endpoints problems [In reply to]

I've tried to execute the following command:

keystone --token ADMIN --endpoint http://192.168.100.142:35357/v2.0 endpoint-create --region RegionOne --service_id=1fd7b5f1add74aa4b6efc514fd153e72 --publicurl="http://192.168.100.142:8774/v2/$(tenant_id)s" --adminurl="http://192.168.100.142:8774/v2/$(tenant_id)s" --internalurl="http://192.168.100.142:8774/v2/$(tenant_id)s"

But I'm getting a "tenant_id: command not found". When I list the endpoints all my url's are like "http://192.168.100.142:8774/v2/s" for the created endpoint.
Am I doing something wrong ?

Thanks.

From: anne [at] openstack
Date: Thu, 12 Apr 2012 15:28:21 -0500
Subject: Re: [Openstack] Endpoints problems
To: guibirk [at] hotmail
CC: openstack [at] lists

Hi Guilherme -
Sorry you ran into a doc bug - https://bugs.launchpad.net/openstack-manuals/+bug/977905.

Basically, the bug states that the nova endpoint definition should be:




keystone --token 012345SECRET99TOKEN012345 --endpoint http://192.168.206.130:35357/v2.0 endpoint-create \

--region RegionOne \

--service_id=abc0f03c02904c24abdcc3b7910e2eed \

--publicurl http://192.168.206.130:8774/v2/$(tenant_id)s \

--adminurl http://192.168.206.130:8774/v2/$(tenant_id)s \

--internalurl http://192.168.206.130:8774/v2/$(tenant_id)s
I haven't fixed this yet because I'm not sure if the $(tenant_id)s is literal or which tenant_id specifically to use (the Service tenant for the adminurl possibly)?



If someone on the list could offer more input here and on the doc bug it would be greatly appreciated!
Anne

On Thu, Apr 12, 2012 at 12:25 PM, Guilherme Birk <guibirk [at] hotmail> wrote:






I'm having problems setting up the nova endpoint. I've followed the manual http://docs.openstack.org/trunk/openstack-compute/install/content/setting-up-tenants-users-and-roles.html, putting the tenant id on the url's, like the manual says to do. But when I try execute "nova list" I got a malformed url error. When I set the endpoint without the tenant id on the url's I got a 404 error. Anyone having the same problem?



I can access the dashboard normally, but I'm unable to retrieve instance list.

_______________________________________________

Mailing list: https://launchpad.net/~openstack

Post to : openstack [at] lists

Unsubscribe : https://launchpad.net/~openstack

More help : https://help.launchpad.net/ListHelp


kiall at managedit

Apr 13, 2012, 6:40 AM

Post #14 of 23 (1169 views)
Permalink
Re: Endpoints problems [In reply to]

Use single quotes, instead of double quotes.

$() has a special meaning in bash.. it executes whatever is between the
braces and substitutes the whole thing for the STDOUT of the command it
ran...

Thanks,
Kiall


On Fri, Apr 13, 2012 at 2:28 PM, Guilherme Birk <guibirk [at] hotmail> wrote:

> I've tried to execute the following command:
>
> keystone --token ADMIN --endpoint http://192.168.100.142:35357/v2.0endpoint-create --region RegionOne
> --service_id=1fd7b5f1add74aa4b6efc514fd153e72 --publicurl="
> http://192.168.100.142:8774/v2/$(tenant_id)s" --adminurl="
> http://192.168.100.142:8774/v2/$(tenant_id)s" --internalurl="
> http://192.168.100.142:8774/v2/$(tenant_id)s"
>
> But I'm getting a "tenant_id: command not found". When I list the
> endpoints all my url's are like "http://192.168.100.142:8774/v2/s" for
> the created endpoint.
> Am I doing something wrong ?
>
> Thanks.
>
> ------------------------------
> From: anne [at] openstack
> Date: Thu, 12 Apr 2012 15:28:21 -0500
>
> Subject: Re: [Openstack] Endpoints problems
> To: guibirk [at] hotmail
> CC: openstack [at] lists
>
>
> Hi Guilherme -
> Sorry you ran into a doc bug -
> https://bugs.launchpad.net/openstack-manuals/+bug/977905.
>
> Basically, the bug states that the nova endpoint definition should be:
>
> keystone --token 012345SECRET99TOKEN012345 --endpoint
> http://192.168.206.130:35357/v2.0 endpoint-create \
>
> --region RegionOne \
> --service_id=abc0f03c02904c24abdcc3b7910e2eed \
> --publicurl
> http://192.168.206.130:8774/v2/$(tenant_id)s \
> --adminurl
> http://192.168.206.130:8774/v2/$(tenant_id)s \
> --internalurl
> http://192.168.206.130:8774/v2/$(tenant_id)s
>
> I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
> literal or which tenant_id specifically to use (the Service tenant for the
> adminurl possibly)?
>
> If someone on the list could offer more input here and on the doc bug it
> would be greatly appreciated!
> Anne
>
> On Thu, Apr 12, 2012 at 12:25 PM, Guilherme Birk <guibirk [at] hotmail>wrote:
>
> I'm having problems setting up the nova endpoint. I've followed the
> manual
> http://docs.openstack.org/trunk/openstack-compute/install/content/setting-up-tenants-users-and-roles.html,
> putting the tenant id on the url's, like the manual says to do. But when I
> try execute "nova list" I got a malformed url error. When I set the
> endpoint without the tenant id on the url's I got a 404 error. Anyone
> having the same problem?
>
> I can access the dashboard normally, but I'm unable to retrieve instance
> list.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>


guibirk at hotmail

Apr 13, 2012, 6:45 AM

Post #15 of 23 (1167 views)
Permalink
Re: Endpoints problems [In reply to]

Thanks Kiall, that worked. Looks like my endpoints are working now, I can execute the nova list command without problems.
Thanks all.

From: kiall [at] managedit
Date: Fri, 13 Apr 2012 14:40:59 +0100
Subject: Re: [Openstack] Endpoints problems
To: guibirk [at] hotmail
CC: openstack [at] lists

Use single quotes, instead of double quotes.
$() has a special meaning in bash.. it executes whatever is between the braces and substitutes the whole thing for the STDOUT of the command it ran...


Thanks,
Kiall



On Fri, Apr 13, 2012 at 2:28 PM, Guilherme Birk <guibirk [at] hotmail> wrote:






I've tried to execute the following command:

keystone --token ADMIN --endpoint http://192.168.100.142:35357/v2.0 endpoint-create --region RegionOne --service_id=1fd7b5f1add74aa4b6efc514fd153e72 --publicurl="http://192.168.100.142:8774/v2/$(tenant_id)s" --adminurl="http://192.168.100.142:8774/v2/$(tenant_id)s" --internalurl="http://192.168.100.142:8774/v2/$(tenant_id)s"



But I'm getting a "tenant_id: command not found". When I list the endpoints all my url's are like "http://192.168.100.142:8774/v2/s" for the created endpoint.


Am I doing something wrong ?

Thanks.

From: anne [at] openstack
Date: Thu, 12 Apr 2012 15:28:21 -0500
Subject: Re: [Openstack] Endpoints problems


To: guibirk [at] hotmail
CC: openstack [at] lists

Hi Guilherme -


Sorry you ran into a doc bug - https://bugs.launchpad.net/openstack-manuals/+bug/977905.

Basically, the bug states that the nova endpoint definition should be:






keystone --token 012345SECRET99TOKEN012345 --endpoint http://192.168.206.130:35357/v2.0 endpoint-create \

--region RegionOne \

--service_id=abc0f03c02904c24abdcc3b7910e2eed \

--publicurl http://192.168.206.130:8774/v2/$(tenant_id)s \

--adminurl http://192.168.206.130:8774/v2/$(tenant_id)s \

--internalurl http://192.168.206.130:8774/v2/$(tenant_id)s
I haven't fixed this yet because I'm not sure if the $(tenant_id)s is literal or which tenant_id specifically to use (the Service tenant for the adminurl possibly)?





If someone on the list could offer more input here and on the doc bug it would be greatly appreciated!
Anne

On Thu, Apr 12, 2012 at 12:25 PM, Guilherme Birk <guibirk [at] hotmail> wrote:








I'm having problems setting up the nova endpoint. I've followed the manual http://docs.openstack.org/trunk/openstack-compute/install/content/setting-up-tenants-users-and-roles.html, putting the tenant id on the url's, like the manual says to do. But when I try execute "nova list" I got a malformed url error. When I set the endpoint without the tenant id on the url's I got a 404 error. Anyone having the same problem?





I can access the dashboard normally, but I'm unable to retrieve instance list.

_______________________________________________

Mailing list: https://launchpad.net/~openstack

Post to : openstack [at] lists

Unsubscribe : https://launchpad.net/~openstack

More help : https://help.launchpad.net/ListHelp





_______________________________________________

Mailing list: https://launchpad.net/~openstack

Post to : openstack [at] lists

Unsubscribe : https://launchpad.net/~openstack

More help : https://help.launchpad.net/ListHelp


david.kranz at qrclab

Apr 13, 2012, 6:48 AM

Post #16 of 23 (1168 views)
Permalink
Re: Endpoints problems [In reply to]

As far as my experience goes, you have to use %(tenant_id)s. I ran into
this problem the first time I did it as well. $ makes the shell think
it's a variable.

David Kranz
Quanta Research Cambridge



On 4/13/2012 9:28 AM, Guilherme Birk wrote:
> I've tried to execute the following command:
>
> keystone --token ADMIN --endpoint http://192.168.100.142:35357/v2.0
> endpoint-create --region RegionOne
> --service_id=1fd7b5f1add74aa4b6efc514fd153e72
> --publicurl="http://192.168.100.142:8774/v2/$(tenant_id)s"
> --adminurl="http://192.168.100.142:8774/v2/$(tenant_id)s"
> --internalurl="http://192.168.100.142:8774/v2/$(tenant_id)s"
>
> But I'm getting a "tenant_id: command not found". When I list the
> endpoints all my url's are like "http://192.168.100.142:8774/v2/s" for
> the created endpoint.
> Am I doing something wrong ?
>
> Thanks.
>
> ------------------------------------------------------------------------
> From: anne [at] openstack
> Date: Thu, 12 Apr 2012 15:28:21 -0500
> Subject: Re: [Openstack] Endpoints problems
> To: guibirk [at] hotmail
> CC: openstack [at] lists
>
> Hi Guilherme -
> Sorry you ran into a doc bug -
> https://bugs.launchpad.net/openstack-manuals/+bug/977905.
>
> Basically, the bug states that the nova endpoint definition should be:
>
> keystone --token 012345SECRET99TOKEN012345 --endpoint
> http://192.168.206.130:35357/v2.0 endpoint-create \
>
> --region RegionOne \
> --service_id=abc0f03c02904c24abdcc3b7910e2eed \
> --publicurl
> http://192.168.206.130:8774/v2/$(tenant_id)s
> <http://192.168.206.130:8774/v2/%24%28tenant_id%29s> \
> --adminurl
> http://192.168.206.130:8774/v2/$(tenant_id)s
> <http://192.168.206.130:8774/v2/%24%28tenant_id%29s> \
> --internalurl
> http://192.168.206.130:8774/v2/$(tenant_id)s
> <http://192.168.206.130:8774/v2/%24%28tenant_id%29s>
>
>
> I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
> literal or which tenant_id specifically to use (the Service tenant for
> the adminurl possibly)?
>
> If someone on the list could offer more input here and on the doc bug
> it would be greatly appreciated!
> Anne
>
> On Thu, Apr 12, 2012 at 12:25 PM, Guilherme Birk <guibirk [at] hotmail
> <mailto:guibirk [at] hotmail>> wrote:
>
> I'm having problems setting up the nova endpoint. I've followed
> the manual
> http://docs.openstack.org/trunk/openstack-compute/install/content/setting-up-tenants-users-and-roles.html,
> putting the tenant id on the url's, like the manual says to do.
> But when I try execute "nova list" I got a malformed url error.
> When I set the endpoint without the tenant id on the url's I got a
> 404 error. Anyone having the same problem?
>
> I can access the dashboard normally, but I'm unable to retrieve
> instance list.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> <https://launchpad.net/%7Eopenstack>
> Post to : openstack [at] lists
> <mailto:openstack [at] lists>
> Unsubscribe : https://launchpad.net/~openstack
> <https://launchpad.net/%7Eopenstack>
> More help : https://help.launchpad.net/ListHelp
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


dtroyer at gmail

Apr 13, 2012, 6:48 AM

Post #17 of 23 (1167 views)
Permalink
Re: Endpoints problems [In reply to]

On Fri, Apr 13, 2012 at 8:28 AM, Guilherme Birk <guibirk [at] hotmail> wrote:
> keystone --token ADMIN --endpoint http://192.168.100.142:35357/v2.0
> endpoint-create --region RegionOne
> --service_id=1fd7b5f1add74aa4b6efc514fd153e72
> --publicurl="http://192.168.100.142:8774/v2/$(tenant_id)s"
> --adminurl="http://192.168.100.142:8774/v2/$(tenant_id)s"
> --internalurl="http://192.168.100.142:8774/v2/$(tenant_id)s"
>
> But I'm getting a "tenant_id: command not found". When I list the endpoints
> all my url's are like "http://192.168.100.142:8774/v2/s" for the created
> endpoint.
> Am I doing something wrong ?

You need to escape the '$'s in your URLs or change the double quotes
around them to single quotes. The shell sees the $(tenant_id) and
attempts to execute a command called tenant_id.

dt

--

Dean Troyer
dtroyer [at] gmail

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


zaitcev at redhat

Apr 13, 2012, 7:03 AM

Post #18 of 23 (1171 views)
Permalink
Re: Endpoints problems [In reply to]

On Fri, 13 Apr 2012 13:28:36 +0000
Guilherme Birk <guibirk [at] hotmail> wrote:

> keystone --token ADMIN --publicurl="http://192.168.100.142:8774/v2/$(tenant_id)s"
> But I'm getting a "tenant_id: command not found".

Shell expands variables in the double quote (") strings, so you
have to use single quote (').

-- Pete

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


kiall at managedit

Apr 13, 2012, 8:12 AM

Post #19 of 23 (1173 views)
Permalink
Re: Endpoints problems [In reply to]

I would be surprised if you could simply interchange the $ with a %.. Never
tried it though!

Anyway - $ is defiantly the "correct" character to use:
https://github.com/openstack-dev/devstack/blob/master/files/default_catalog.templates

Thanks,
Kiall


On Fri, Apr 13, 2012 at 2:48 PM, David Kranz <david.kranz [at] qrclab> wrote:

> As far as my experience goes, you have to use %(tenant_id)s. I ran into
> this problem the first time I did it as well. $ makes the shell think it's
> a variable.
>
> David Kranz
> Quanta Research Cambridge
>
>
>
>
> On 4/13/2012 9:28 AM, Guilherme Birk wrote:
>
> I've tried to execute the following command:
>
> keystone --token ADMIN --endpoint http://192.168.100.142:35357/v2.0endpoint-create --region RegionOne
> --service_id=1fd7b5f1add74aa4b6efc514fd153e72 --publicurl=
> "http://192.168.100.142:8774/v2/$(tenant_id)s"<http://192.168.100.142:8774/v2/$(tenant_id)s>--adminurl=
> "http://192.168.100.142:8774/v2/$(tenant_id)s"<http://192.168.100.142:8774/v2/$(tenant_id)s>--internalurl=
> "http://192.168.100.142:8774/v2/$(tenant_id)s"<http://192.168.100.142:8774/v2/$(tenant_id)s>
>
> But I'm getting a "tenant_id: command not found". When I list the
> endpoints all my url's are like "http://192.168.100.142:8774/v2/s"<http://192.168.100.142:8774/v2/s>for the created endpoint.
> Am I doing something wrong ?
>
> Thanks.
>
> ------------------------------
> From: anne [at] openstack
> Date: Thu, 12 Apr 2012 15:28:21 -0500
> Subject: Re: [Openstack] Endpoints problems
> To: guibirk [at] hotmail
> CC: openstack [at] lists
>
> Hi Guilherme -
> Sorry you ran into a doc bug -
> https://bugs.launchpad.net/openstack-manuals/+bug/977905.
>
> Basically, the bug states that the nova endpoint definition should be:
>
> keystone --token 012345SECRET99TOKEN012345 --endpoint
> http://192.168.206.130:35357/v2.0 endpoint-create \
>
> --region RegionOne \
> --service_id=abc0f03c02904c24abdcc3b7910e2eed \
> --publicurl
> http://192.168.206.130:8774/v2/$(tenant_id)s \
> --adminurl
> http://192.168.206.130:8774/v2/$(tenant_id)s \
> --internalurl
> http://192.168.206.130:8774/v2/$(tenant_id)s
>
> I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
> literal or which tenant_id specifically to use (the Service tenant for the
> adminurl possibly)?
>
> If someone on the list could offer more input here and on the doc bug it
> would be greatly appreciated!
> Anne
>
> On Thu, Apr 12, 2012 at 12:25 PM, Guilherme Birk <guibirk [at] hotmail>wrote:
>
> I'm having problems setting up the nova endpoint. I've followed the
> manual
> http://docs.openstack.org/trunk/openstack-compute/install/content/setting-up-tenants-users-and-roles.html,
> putting the tenant id on the url's, like the manual says to do. But when I
> try execute "nova list" I got a malformed url error. When I set the
> endpoint without the tenant id on the url's I got a 404 error. Anyone
> having the same problem?
>
> I can access the dashboard normally, but I'm unable to retrieve instance
> list.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>


dolph.mathews at gmail

Apr 13, 2012, 10:50 AM

Post #20 of 23 (1177 views)
Permalink
Re: Endpoints problems [In reply to]

While $(tenant_id)s is certainly the documented syntax, it appears that the
SQL catalog backend (and *only* the SQL catalog backend, as far as I can
tell) explicitly supports both $(tenant_id)s and %(tenant_id)s:

https://github.com/openstack/keystone/blob/master/keystone/catalog/backends/sql.py#L163

Perhaps Adam Gandelman has some insight?

-Dolph

On Fri, Apr 13, 2012 at 10:12 AM, Kiall Mac Innes <kiall [at] managedit>wrote:

> I would be surprised if you could simply interchange the $ with a %..
> Never tried it though!
>
> Anyway - $ is defiantly the "correct" character to use:
> https://github.com/openstack-dev/devstack/blob/master/files/default_catalog.templates
>
> Thanks,
> Kiall
>
>
>
> On Fri, Apr 13, 2012 at 2:48 PM, David Kranz <david.kranz [at] qrclab>wrote:
>
>> As far as my experience goes, you have to use %(tenant_id)s. I ran into
>> this problem the first time I did it as well. $ makes the shell think it's
>> a variable.
>>
>> David Kranz
>> Quanta Research Cambridge
>>
>>
>>
>>
>> On 4/13/2012 9:28 AM, Guilherme Birk wrote:
>>
>> I've tried to execute the following command:
>>
>> keystone --token ADMIN --endpoint http://192.168.100.142:35357/v2.0endpoint-create --region RegionOne
>> --service_id=1fd7b5f1add74aa4b6efc514fd153e72 --publicurl=
>> "http://192.168.100.142:8774/v2/$(tenant_id)s"<http://192.168.100.142:8774/v2/$(tenant_id)s>--adminurl=
>> "http://192.168.100.142:8774/v2/$(tenant_id)s"<http://192.168.100.142:8774/v2/$(tenant_id)s>--internalurl=
>> "http://192.168.100.142:8774/v2/$(tenant_id)s"<http://192.168.100.142:8774/v2/$(tenant_id)s>
>>
>> But I'm getting a "tenant_id: command not found". When I list the
>> endpoints all my url's are like "http://192.168.100.142:8774/v2/s"<http://192.168.100.142:8774/v2/s>for the created endpoint.
>> Am I doing something wrong ?
>>
>> Thanks.
>>
>> ------------------------------
>> From: anne [at] openstack
>> Date: Thu, 12 Apr 2012 15:28:21 -0500
>> Subject: Re: [Openstack] Endpoints problems
>> To: guibirk [at] hotmail
>> CC: openstack [at] lists
>>
>> Hi Guilherme -
>> Sorry you ran into a doc bug -
>> https://bugs.launchpad.net/openstack-manuals/+bug/977905.
>>
>> Basically, the bug states that the nova endpoint definition should be:
>>
>> keystone --token 012345SECRET99TOKEN012345 --endpoint
>> http://192.168.206.130:35357/v2.0 endpoint-create \
>>
>> --region RegionOne \
>> --service_id=abc0f03c02904c24abdcc3b7910e2eed \
>> --publicurl
>> http://192.168.206.130:8774/v2/$(tenant_id)s \
>> --adminurl
>> http://192.168.206.130:8774/v2/$(tenant_id)s \
>> --internalurl
>> http://192.168.206.130:8774/v2/$(tenant_id)s
>>
>> I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
>> literal or which tenant_id specifically to use (the Service tenant for the
>> adminurl possibly)?
>>
>> If someone on the list could offer more input here and on the doc bug it
>> would be greatly appreciated!
>> Anne
>>
>> On Thu, Apr 12, 2012 at 12:25 PM, Guilherme Birk <guibirk [at] hotmail>wrote:
>>
>> I'm having problems setting up the nova endpoint. I've followed the
>> manual
>> http://docs.openstack.org/trunk/openstack-compute/install/content/setting-up-tenants-users-and-roles.html,
>> putting the tenant id on the url's, like the manual says to do. But when I
>> try execute "nova list" I got a malformed url error. When I set the
>> endpoint without the tenant id on the url's I got a 404 error. Anyone
>> having the same problem?
>>
>> I can access the dashboard normally, but I'm unable to retrieve instance
>> list.
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>


jshepher at rackspace

Apr 13, 2012, 11:12 AM

Post #21 of 23 (1169 views)
Permalink
Re: Endpoints problems [In reply to]

So why would the preferred method be the one that you have to do all sort of magic stuff to protect from bash extrapolation.. and also given that the code converts those to %(tenant_id).. why wouldn't the "%(" way be the preferred way?

Sounds like an artifact of the CLI being a second class use case..

--shep
On Apr 13, 2012, at 8:48 AM, Dean Troyer wrote:

> On Fri, Apr 13, 2012 at 8:28 AM, Guilherme Birk <guibirk [at] hotmail> wrote:
>> keystone --token ADMIN --endpoint http://192.168.100.142:35357/v2.0
>> endpoint-create --region RegionOne
>> --service_id=1fd7b5f1add74aa4b6efc514fd153e72
>> --publicurl="http://192.168.100.142:8774/v2/$(tenant_id)s"
>> --adminurl="http://192.168.100.142:8774/v2/$(tenant_id)s"
>> --internalurl="http://192.168.100.142:8774/v2/$(tenant_id)s"
>>
>> But I'm getting a "tenant_id: command not found". When I list the endpoints
>> all my url's are like "http://192.168.100.142:8774/v2/s" for the created
>> endpoint.
>> Am I doing something wrong ?
>
> You need to escape the '$'s in your URLs or change the double quotes
> around them to single quotes. The shell sees the $(tenant_id) and
> attempts to execute a command called tenant_id.
>
> dt
>
> --
>
> Dean Troyer
> dtroyer [at] gmail
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


adamg at canonical

Apr 13, 2012, 12:34 PM

Post #22 of 23 (1169 views)
Permalink
Re: Endpoints problems [In reply to]

On 04/13/2012 10:50 AM, Dolph Mathews wrote:
> While $(tenant_id)s is certainly the documented syntax, it appears
> that the SQL catalog backend (and *only* the SQL catalog backend, as
> far as I can tell) explicitly supports both $(tenant_id)s and
> %(tenant_id)s:
>
> https://github.com/openstack/keystone/blob/master/keystone/catalog/backends/sql.py#L163
>
> Perhaps Adam Gandelman has some insight?
>
> -Dolph

Dolph-

No, the same is supported in the case of templated catalog as well,
which is what the SQL catalog was largely based off:

https://github.com/openstack/keystone/blob/master/keystone/catalog/backends/templated.py#L115

Just tested that "sed -i 's/\$/%/g'
/etc/keystone/default_catalog.templates" still produces a functional
service catalog when configured to use the templated backend.

Seeing as both are supported, perhaps it would be better for docs to be
updated to refer to the use of % instead of $ to avoid people running
into problems with the $() sub-shell?

Adam


lorin at nimbisservices

Apr 20, 2012, 1:47 PM

Post #23 of 23 (1168 views)
Permalink
Re: Endpoints problems [In reply to]

On Apr 13, 2012, at 12:34 PM, Adam Gandelman wrote:

> On 04/13/2012 10:50 AM, Dolph Mathews wrote:
>>
>> While $(tenant_id)s is certainly the documented syntax, it appears that the SQL catalog backend (and *only* the SQL catalog backend, as far as I can tell) explicitly supports both $(tenant_id)s and %(tenant_id)s:
>>
>> https://github.com/openstack/keystone/blob/master/keystone/catalog/backends/sql.py#L163
>>
>> Perhaps Adam Gandelman has some insight?
>>
>> -Dolph
>
> Dolph-
>
> No, the same is supported in the case of templated catalog as well, which is what the SQL catalog was largely based off:
>
> https://github.com/openstack/keystone/blob/master/keystone/catalog/backends/templated.py#L115
>
> Just tested that "sed -i 's/\$/%/g' /etc/keystone/default_catalog.templates" still produces a functional service catalog when configured to use the templated backend.
>
> Seeing as both are supported, perhaps it would be better for docs to be updated to refer to the use of % instead of $ to avoid people running into problems with the $() sub-shell?
>

The OpenStack Install and Deploy manual has some language about this (see last paragraph): http://docs.openstack.org/trunk/openstack-compute/install/content/elements-of-keystone-service-catalog-entry.html

This hasn't made its way into the admin docs yet, though.


Take care,

Lorin
--
Lorin Hochstein
Lead Architect - Cloud Services
Nimbis Services, Inc.
www.nimbisservices.com

OpenStack dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.