Comment 4 for bug 1089989

Revision history for this message
Gerard Dethier (g-dethier) wrote : Re: [Bug 1089989] Re: CloudStack data source uses wrong address

Scott,

> Reading the patch, I have 2 questions:
> a.) are you sure that getting the router from dhcp response is reliable in this scenario?
I hope so, it is the recommended method in CloudStack's documentation
(see link below). To go into more details, CloudStack uses a VM called
the Virtual Router that exposes several services to created VMs, among
which meta-data and DHCP. Therefore, using DHCP response works. However,
if for some reason several DHCPs are detected, there is an ambiguity
that my code considers as an error.

> b.) is there a better choice for the url to check ?
> Assuming that '/latest/meta-data/instance-id' will always be present is essentially assuming that their MD api version will *always* have that. In other cases we've chosen values to hard code, we've relied on a specific version of the metadata service.
> Ie: /2012-12-12/meta-data/instance-id
> Perhaps we could at lesat try 2 differnet urls there as a failsafe?
It seems there is no better choice (see link below). Currently
CloudStack does not have the concept of API version: there are no
multiple URLs for different versions, only a "latest" one.

http://incubator.apache.org/cloudstack/docs/en-US/Apache_CloudStack/4.0.0-incubating/html/Admin_Guide/user-data-and-meta-data.html