Hi,

Please refer to the jira created [1]

[1] https://issues.apache.org/jira/browse/JCLOUDS-682


On Thu, Aug 21, 2014 at 11:08 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> According  to the discussion in [1], Jclouds does not support this feature
> yet. I started a discussion in Jclods user list and created a jira too.
>
> [1]
> http://stackoverflow.com/questions/25410830/jclouds-neutron-specify-a-nic-when-associating-a-floating-ip
>
>
>
> On Wed, Aug 20, 2014 at 11:44 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi Jeffrey
>>
>> neutron port-create  udara-net
>> neutron floatingip-createv ext
>> neutron floatingip-associate floating_ip-id port-id
>>
>> I created ports and associate a floating ip to the port. Then following
>> code snippet created a instance with two network interfaces.
>>
>>          Set<Network> novaNetworksSet = new LinkedHashSet<Network>(2);
>>          Network n1 = Network.builder().portUuid("port1-id").build();
>>          Network n2 = Network.builder().portUuid("port2-id").build();
>>          novaNetworksSet.add(n1);
>>          novaNetworksSet.add(n2);
>>
>>
>>  
>> template.getOptions().as(NovaTemplateOptions.class).novaNetworks(novaNetworksSet);
>>
>> However I could not find how to associate a floating ip to a port also
>> using Jclouds.
>> I am still investigating on the issue.
>>
>>
>>
>>
>>
>> On Sat, Aug 9, 2014 at 1:41 AM, Jeffrey Nguyen (jeffrngu) <
>> jeffr...@cisco.com> wrote:
>>
>>>  Hi Udara,
>>>
>>>  Thanks for trying out what I suggested earlier.  I think the only
>>> option is to enhance jclouds to accept floating ip for a given fixed IP.
>>> [1] shows that you should be able to allocate a floating IP and
>>> associate it with a fixed IP for a given server
>>> [2] looks like the Openstack API you need
>>>
>>>  [1] Note section at the bottom of
>>> http://docs.openstack.org/user-guide/content/floating_ip_allocate.html
>>> [2]
>>> http://docs.openstack.org/api/openstack-compute/2/content/POST_os-floating-ips-v2_AddFloatingIP__v2__tenant_id__servers__server_id__action_ext-os-floating-ips.html
>>>
>>>  -Jeffrey
>>>
>>>   From: Udara Liyanage <ud...@wso2.com>
>>> Reply-To: "dev@stratos.apache.org" <dev@stratos.apache.org>
>>> Date: Friday, August 8, 2014 4:57 AM
>>> To: Manula Chathurika Thantriwatte <manu...@wso2.com>
>>> Cc: "dev@stratos.apache.org" <dev@stratos.apache.org>
>>>
>>> Subject: Re: STRATOS-698 and issue with single private/public IPs in
>>> topology events
>>>
>>>   Hi Jaffrey,
>>>
>>>  I tried associating floating Ips multiple times. However only the
>>> first floating IP is allocated to the instance. I manually tried using
>>> Openstack horizon UI and ended up in the same situation. I doubt it is a
>>> problem with the Openstack setup I am using.
>>> It seems that nova network API does not have the capability to specify
>>> an interface when associating floating IPs. I am investigating whether this
>>> can be done with Jclouds Neutron API. I will update the thread as I
>>> progress.
>>>
>>>
>>>
>>> On Fri, Jul 11, 2014 at 3:35 PM, Manula Chathurika Thantriwatte <
>>> manu...@wso2.com> wrote:
>>>
>>>> Hi Jeffrey,
>>>>
>>>>  Thank you very much for the clear explanation. Here what I get was
>>>> instances have more than one network interface. Ex : eth0, eth1. These
>>>> interfaces should have different IP ranges (Ex. 10.0.1.0 /24, 10.0.2.0 /
>>>> 24). In the OpenStack environment there should be a router which has some
>>>> NAT rules to route public IP traffic to these network interfaces. So what
>>>> you want is, given public IP in a cartridge definition should be able to
>>>> assign to the given network interface in an instance.
>>>>
>>>>  Please correct me if I'm wrong.
>>>>
>>>>  Thanks !
>>>>
>>>>
>>>>
>>>> On Thu, Jul 10, 2014 at 11:53 PM, Jeffrey Nguyen (jeffrngu) <
>>>> jeffr...@cisco.com> wrote:
>>>>
>>>>>  Thanks Manula and Udara.  I created STRATOS-704
>>>>> <https://issues.apache.org/jira/browse/STRATOS-704> to track the
>>>>> issue of topology events supporting only one public and one private Ips.
>>>>>
>>>>>  Currently, we're not using "publicNetworkUuid" for floating IP
>>>>> allocation.  It is rather allocated based on the property named "
>>>>> defaultFloatingIpPool" in cloud-controller.xml (please refer
>>>>> to STRATOS-646) (I believe this was also documented in Stratos wiki).
>>>>> Ideally, I think we want to allocate floating IP for each network 
>>>>> interface
>>>>> based on the floating IP pool associated with that network.   However, I
>>>>> think using single floating IP pool is good enough for now.  So as far as
>>>>> this issue is concerned, you should not have to worry about
>>>>> "publicNetworkUuid".
>>>>>
>>>>>  BTW, the property "networkUuid" in the cartridge JSOn on the other
>>>>> hand is different from "publicNetworkUuid".  "networkUuid" represents the
>>>>> uuid of a particular network interface of the cartridge.  It is used to
>>>>> attach a network to a cartridge at launch.
>>>>>
>>>>>  I think for  STRATOS-698, what you need to do is instead of
>>>>> allocating floating IP only once, do that as many times as the number of
>>>>> network interfaces defined for the given cartridge.
>>>>>
>>>>>  I looks like jClouds floating IP api does not provide the
>>>>> granularity of specifying which network interface the floating IP is being
>>>>> allocated for.   So I'm not sure if allocating floating IP against the 
>>>>> same
>>>>> node multiple times will overwrite the previous floating Ip (for the same
>>>>> network interface) or creating new floating IP for the next network
>>>>> interface.  Hopefully it's the later case.
>>>>>
>>>>>  Your thoughts?
>>>>>
>>>>>  -Jeffrey
>>>>>
>>>>>   From: Udara Liyanage <ud...@wso2.com>
>>>>> Date: Thursday, July 10, 2014 1:03 AM
>>>>> To: dev <dev@stratos.apache.org>
>>>>> Cc: jeffrngu <jeffr...@cisco.com>
>>>>> Subject: Re: STRATOS-698 and issue with single private/public IPs in
>>>>> topology events
>>>>>
>>>>>   Hi,
>>>>>
>>>>>  What I understood from the jira is, you specify multiple network
>>>>> interfaces in cartridge json. Additinaly you want to assign the floating 
>>>>> IP
>>>>> to one of the interfaces you prefer. I guess the uuid you have specified
>>>>> are the uuid of your openstack networks.
>>>>> One thing I have noticed is, instance is not aware of the public IP it
>>>>> is assigned, Openstack does the routing of floating IPs. The reason why I
>>>>> am saying is when I execute "ifconfig" I did not see any interface got
>>>>> assigned a floating IP.
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Jul 10, 2014 at 12:30 PM, Manula Chathurika Thantriwatte <
>>>>> manu...@wso2.com> wrote:
>>>>>
>>>>>> Hi Jeffrey,
>>>>>>
>>>>>>  Yes, currently I'm working on this JIRA. When going through stratos
>>>>>> the code, I find out that currently there is no implementations for the
>>>>>> "publicNetworkUuid". So I'll try to find out the implementation in
>>>>>> the jclouds whether they support this functionality.
>>>>>>
>>>>>>  According to the current implementation topology events support
>>>>>> only one private and one public IP. Can you please create new JIRA for
>>>>>> that.
>>>>>>
>>>>>>  We are planning to fix these issues in the release branch.
>>>>>>
>>>>>>  Thanks !
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Jul 9, 2014 at 9:35 PM, Jeffrey Nguyen (jeffrngu) <
>>>>>> jeffr...@cisco.com> wrote:
>>>>>>
>>>>>>>  Hi Manula,
>>>>>>>
>>>>>>>  Looks like you're currently working on this JIRA.   Wanted to
>>>>>>> check with you if you're going to fix the issue of topology events
>>>>>>> supporting only one private IP and one public IP.   I think this issue 
>>>>>>> is
>>>>>>> related to the floating IP issue described in this JIRA.   Are you 
>>>>>>> going to
>>>>>>> address this issue as well as part of the fix for this JIRA?
>>>>>>>
>>>>>>>  I think the fixes for these issues should go into the release
>>>>>>> branch.
>>>>>>>
>>>>>>>  Thanks,
>>>>>>> -Jeffrey
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>   --
>>>>>>       Regards,
>>>>>>  Manula Chathurika Thantriwatte
>>>>>>  Software Engineer
>>>>>>  WSO2 Inc. : http://wso2.com
>>>>>>  lean . enterprise . middleware
>>>>>>
>>>>>>  email : manu...@wso2.com / man...@apache.org
>>>>>>  phone : +94 772492511
>>>>>>  blog : http://manulachathurika.blogspot.com/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>  --
>>>>>
>>>>> Udara Liyanage
>>>>> Software Engineer
>>>>> WSO2, Inc.: http://wso2.com
>>>>> lean. enterprise. middleware
>>>>>
>>>>>  web: http://udaraliyanage.wordpress.com
>>>>>  phone: +94 71 443 6897
>>>>>
>>>>
>>>>
>>>>
>>>>  --
>>>>       Regards,
>>>>  Manula Chathurika Thantriwatte
>>>>  Software Engineer
>>>>  WSO2 Inc. : http://wso2.com
>>>>  lean . enterprise . middleware
>>>>
>>>>  email : manu...@wso2.com / man...@apache.org
>>>>  phone : +94 772492511
>>>>  blog : http://manulachathurika.blogspot.com/
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>  --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>>  web: http://udaraliyanage.wordpress.com
>>>  phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Reply via email to