On 07/11/12 17:36, Ian Main wrote:
> On Wed, Nov 07, 2012 at 11:10:40AM +0200, [email protected] wrote:
>> On 06/11/12 21:33, Ian Main wrote:
>>> On Fri, Nov 02, 2012 at 11:07:16AM +0200, [email protected] wrote:
>>>> On 02/11/12 11:02, Michal Fojtik wrote:
>>>>> On 11/01/2012 08:51 PM, Ian Main wrote:
>>>>>
>>>>> ACK.
>>>>>
>>>>
>>>> hold on, am a bit confused. 'user-data' is already supported by the
>>>> 'server personality' as documented in the API [1] ... is 'user-data'
>>>> something different?
>>>>
>>>
>>> I think it is slightly different.  Basically this mimics the ec2 style
>>> user-data where the data can be grabbed via http from some part of the
>>> cloud engine.  See eg:
>>>
>>> http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html
>>>
>>
>> indeed - now I understand. Right now the Openstack driver uses the
>> ruby-openstack rubygem [1] (which we co-maintain) to 'talk' to the
>> Openstack provider. In other words we only consume/interact with the
>> 'native' Openstack (nova/swift/etc) APIs and not with the EC2 API that a
>> given Openstack provider may expose. This means that even though you are
>> passing 'user_data' to the server create method in your patch, this will
>> just be ignored (as the Openstack rubygem and the Openstack API in
>> general have no idea about 'user_data'). I have to work out the details
>> around this in order to add what you want - for example use the
>> appoxy/aws rubygem to talk to the ec2 endpoint of the openstack server.
> 
> I am not sure exactly what you mean.. the user data as implemented in
> the driver does work, it is simply passed through as a parameter of the
> request.  The request ends up looking just like the one novaclient uses.
> 

tl;dr: thanks for persevering and apologies! I just pushed this patch
with commit id  33bb4363a3e712d2b587177131aff63b8f26c00a (more
explanation below)

marios


------
longer version ("explain yourself damnit!"):

* there is no mention of 'user_data' parameter in the Compute API v2
spec @
http://docs.openstack.org/api/openstack-compute/2/content/CreateServers.html
- I filed a bug report against the docs @
https://bugs.launchpad.net/openstack-manuals/+bug/1076293

* the fact that this patch works is a happy coincidence - I just checked
the 'create_server' code in the openstack gem and saw that besides
checking for some required params (like 'name', 'flavorRef' and
'imageRef') the supplied parameter hash is converted to JSON and passed
through to Openstack unchanged... including the user_data you supply here.

* confusion around the 'EC2 endpoint' due to the fact that as I couldn't
find 'user_data' parameter in the docs, I assumed it was specific to the
(Openstack exposed) EC2 API. Hence my ramble around 'working out' how to
talk to that.

*    o_o "cool story bro"


>     Ian
> 

Reply via email to