So the idea here is to use the floating-IP pool concept in conjunction with 
'ComputeService.createNodesInGroup()'. I (meaning the user) don't particularly 
care what the IP is for a given node in a group only that it gets a valid IP. 
Currently there is no way to auto-assign (or at least the current way seems to 
be broken) floating-IP's when creating a group of nodes. The idea I had was to 
pass a Set of pool-names that could be used when trying to assign 
floating-IP's. The average case will probably be 1 pool name but the idea was 
to add some flexibility to allow the user to pass in N number of pool-names so 
that an IP could be culled from somewhere.

" Also, the Ip in the set that will actually be allocated is not predictable"

This is true but only to a degree. Floating IP pools will have some number of 
IP's previously configured/assigned beforehand. This could be anywhere from 0 
to N. So in that respect the user would know to some degree what the IP is 
and/or could be ... but such is the case whenever you are using Floating-IP 
pools anyway.

-----Original Message-----
From: Ignasi Barrera [mailto:n...@apache.org] 
Sent: Monday, June 30, 2014 3:35 AM
To: dev@jclouds.apache.org
Subject: Re: On JIRA issue JCLOUDS-607

Hi Chris,

Contributions are very welcome, so go for it! :)

Regarding the proposed implementation, you'll be passing a Set but allocating 
only one Ip. Couldn't this cause confusion to users? Also, the Ip in the set 
that will actually be allocated is not predictable.

Would it be better to pass just one Ip, or allocate all them, if keeping the 
Set?

Thanks for taking this!

I.
El 28/06/2014 21:30, "Dancy, Chris" <chris.da...@pega.com> escribió:

> Hey,
>
> As I'm the one who found this bug I'd like to take a stab at coding a 
> solution. The JIRA issue can be found here:
>
> https://issues.apache.org/jira/browse/JCLOUDS-607
>
> It's currently marked as not assigned to anyone but I didn't know if 
> anyone had done any preliminary work looking at this and/or is doing 
> anything behind the scenes and/or has any ideas as to best go about 
> solving the issue. Taking a look at things my thinking was going this 
> direction (this is a thousand foot POV so I don't have all the 
> nitty-gritty details worked out yet just an idea):
>
>         1.) Add method 'floatingIpPoolNames(Set<String>)' to 
> NovaTemplateOptions.
>         2.) This of course will be passed to a Template via 
> 'Template.options(novaTemplateOptions).build()'
>         3.) Further down the call chain, and in class 
> 'AllocateAndAddFloatingipToNode', and specifically around line 81 
> which makes a call to 'floatingApi.create()', check if we have any 
> ip-pools defined. Implementation might got something like this:
>
>                         if <some-pools-defined> then:
>                                 for(String poolName : 
> somePoolIterator) //allows for passing multiple pools
>                                         ip = 
> floatingApi.allocate(poolName);
>                                         if ip != null
>                                                 break;
>                          else:
>                                 floatingApi.create()
>
> How the NovaTemplateOptions will get from step 2 to 3 I honestly don't 
> know yet as I've not gone through the source but I'm assuming it's 
> relatively painless. Thoughts?
>
> Thanks,
> Chris
>

Reply via email to