> On April 18, 2013, 11:36 p.m., Chiradeep Vittal wrote:
> > Is the fundamental problem that the data is available under 
> > /latest/metadata instead of /latest/meta-data ?
> >

cloud-init (as of 0.7.2) uses the uripath '/latest/meta-data' (meta-data is the 
default in the boto APIs and the cloud-init code currently does not try to 
override it.) when it issues a GET. 

metadataentry1='RewriteRule ^meta-data/$ ../metadata/%{REMOTE_ADDR}/meta-data 
[L,NC,QSA]'
This rule gets the list of metadata attributes, as meta-data contains a list of 
metadata attributes like. local-ipv4, public-hostname, etc..

Once it gets the list it needs to know which attribute it's pulling data from 
thus the rule below:
metadataentry2='RewriteRule ^meta-data/(.*)$ ../metadata/%{REMOTE_ADDR}/$1 
[L,NC,QSA]'
will pull the actually data from the given metadata attribute (i.e. 
'/latest/meta-data/local-ipv4', '/latest/meta-data/public-hostname', etc.)

We're probably not as familiar with apache rewrite rules and if just having 
metadataentry1 is all that's needed to accomplish the above then by all means 
lets simplify it.


- ilya


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10614/#review19416
-----------------------------------------------------------


On April 18, 2013, 11:02 p.m., ilya musayev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10614/
> -----------------------------------------------------------
> 
> (Updated April 18, 2013, 11:02 p.m.)
> 
> 
> Review request for cloudstack and Chiradeep Vittal.
> 
> 
> Description
> -------
> 
> Addressed 2 issues:
> Rewrote the bash if/else check to fix redundant entries
> Added RewriteRules to support boto/cloud-init - as per Chiradeep - this would 
> only affect VMWare deployments, as this userdata.sh script is only used with 
> vmware system router vms
> 
> 
> This addresses bug CLOUDSTACK-2053.
> 
> 
> Diffs
> -----
> 
>   patches/systemvm/debian/config/root/userdata.sh e5d170b 
> 
> Diff: https://reviews.apache.org/r/10614/diff/
> 
> 
> Testing
> -------
> 
> ACS4.1
> 
> 
> Thanks,
> 
> ilya musayev
> 
>

Reply via email to