<div dir="ltr"><span style="font-size:12.8000001907349px">Andrew,</span><div style="font-size:12.8000001907349px">We do that using the metadata information of the instance. We pass information as tenant, type of service, etc, to create pools of VMs that provide different services. </div><div style="font-size:12.8000001907349px">The metadata is retrieve with cloud-init or with a simple curl to 169.254.169.254 (see: <a href="http://docs.openstack.org/admin-guide-cloud/content/section_metadata-service.html" target="_blank">http://docs.openstack.org/admin-guide-cloud/content/section_metadata-service.html</a>).</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Best!</div><div style="font-size:12.8000001907349px">Max</div><div class="gmail_extra" style="font-size:12.8000001907349px"><div dir="ltr"><table cellpadding="4" cellspacing="0" width="380"><tbody><tr><td valign="MIDDLE" width="87"><img src="https://mail.google.com/mail/u/2/?ui=2&ik=d395dac237&view=fimg&th=14e02065ea24c4b2&attid=0.1.0.1&disp=emb&realattid=30580ca61a7db6f2_0.1.1&attbid=ANGjdJ-4KC_jbA-eDDWuEBYq1YinlZtvo2luw-2BSyb9lyAMs9RcJgBt54fZ2JVmOzMpgWr5Sk__JwylC66R-tVrM0WBiXYvizQxrR-ZB03isdjy7v3TeTd97wKDIrA&sz=s0-l75-ft&ats=1434553229480&rm=14e02065ea24c4b2&zw&atsh=1" class=""><br></td><td width="319" style="padding:0.04in"><font style="font-weight:bold;font-size:8pt">Max Tkach | Cloud Services & Operations</font><br><font style="font-weight:bold;font-size:8pt">MercadoLibre CloudBuilders</font><br><font style="font-family:monospace;font-size:7pt">GTalk:</font><font style="font-family:monospace;color:rgb(85,85,85);font-size:7pt"> <a href="mailto:maxtkach@gmail.com" target="_blank">maxtkach@gmail.com</a></font></td></tr></tbody></table></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 17, 2015 at 10:33 AM, Andrew Bogott <span dir="ltr"><<a href="mailto:abogott@wikimedia.org" target="_blank">abogott@wikimedia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 6/16/15 9:13 PM, Sam Su wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Did you tried to get the tenant info from the nova API?<br>
</blockquote></span>
I haven't tried that -- that would, I guess, involve giving root on each instance keystone credentials?  I don't otherwise have cause to give OpenSTack API access to users of my instances.<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-----Original Message-----<br>
From: Andrew Bogott [mailto:<a href="mailto:abogott@wikimedia.org" target="_blank">abogott@wikimedia.org</a>]<br>
Sent: Tuesday, June 16, 2015 6:46 PM<br>
To: <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Subject: [Openstack] How should an instance learn what tenant it is in?<br>
<br>
      I have many uses cases in which an instance needs to know what project<br>
it is in.  Right now I accomplish this through an intricate hack which<br>
involves hooking instance creation and writing the tenant name to an ldap<br>
record.<br>
<br>
      I'm considering rewriting this hack to write the tenant name into the<br>
metadata directly, but that will still be a hack.  Is there an obvious,<br>
implemented solution to this that I'm missing?  If not, would a nova patch<br>
that adds tenant id and name to the metadata be welcome?  Or, are there<br>
security reasons for preventing an instance from knowing its tenant?<br>
<br>
-Andrew<br>
<br>
_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
<br>
</blockquote>
<br>
<br>
_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
</div></div></blockquote></div><br></div>