[Openstack] How should an instance learn what tenant it is in?

Andrew Bogott abogott at wikimedia.org
Fri Jun 19 00:19:49 UTC 2015


On 6/18/15 1:43 AM, Morgan Fainberg wrote:
>
> On Jun 17, 2015, at 23:14, Tim Bell <Tim.Bell at cern.ch> wrote:
>
>>> -----Original Message-----
>>> From: Jan van Eldik [mailto:Jan.van.Eldik at cern.ch]
>>> Sent: 17 June 2015 20:54
>>> To: openstack at lists.openstack.org
>>> Subject: Re: [Openstack] How should an instance learn what tenant it is in?
>>>
>>> Hi Andrew,
>>>
>>>>      I'm considering rewriting this hack to write the tenant name into
>>>> the metadata directly, but that will still be a hack.
>>> That's what many of our customers are doing, and I agree that it's hack.
>>>
>>> We recently changed the names of some projects, and updating the
>>> metadata is no fun.
>>>
>>>> If not, would a
>>>> nova patch that adds tenant id and name to the metadata be welcome?
>>> We would welcome it. It should respect project renames, of course. :)
>>>
>> I'd suggest just storing the tenant id and then doing the lookup in the CLI tools to be human friendly. The image handling seems to work this way so copying the same structure as the image field would be consistent.
>>
>> | image                                | CentOS7 (71093ab4-5d10-4109-86b6-ba3a82db1fb8)         |

Yeah, I agree -- the tenant id is something that nova surely already 
knows...  The tenant name seems like a different can o' worms.

Anyway, I'll try to have a look at coding this up in the next few 
weeks.  In the meantime I'm just sticking it in metadata myself via a 
custom hook.

Thanks for the suggestions, everyone!

-A


>>
>>>         cheers, Jan
>>>
>>> _______________________________________________
>>> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>> Post to     : openstack at lists.openstack.org
>>> Unsubscribe : http://lists.openstack.org/cgi-
>>> bin/mailman/listinfo/openstack
>> _______________________________________________
>> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>> Post to     : openstack at lists.openstack.org
>> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> This could also be supplied by config drive/metadata service trivially. I wouldn't overthink it (nova already knows).
>
> --Morgan
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack





More information about the Openstack mailing list