We shouldn't be releasing the non-allocated IPs. Since you are claiming
that we are doing so, I had a look at the code, but I see only
https://github.com/apache/stratos/blob/master/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java#L842
where we set allocated IP to member context. So, only that IP should have
been released. Isn't it the case? Please point to code segments.

On Fri, Nov 21, 2014 at 7:34 AM, Rajkumar Rajaratnam <[email protected]>
wrote:

> Hi Nirmal,
>
> On Fri, Nov 21, 2014 at 11:46 AM, Nirmal Fernando <[email protected]>
> wrote:
>
>>
>>
>> On Fri, Nov 21, 2014 at 6:24 AM, Rajkumar Rajaratnam <[email protected]>
>> wrote:
>>
>>> Hi devs,
>>>
>>> We have the following fields in Member Context;
>>>
>>> // private ip  private String privateIpAddress;  // public ip  private
>>> String publicIpAddress;  // manually allocated ip  private String
>>> allocatedIpAddress;
>>> I hope that the reason for having allocatedIpAddress is to release it
>>> when terminating the instance. We are not releasing(deleting) all the
>>> public IPs.
>>>
>>> Predefined IPs should not released when terminating the instances right?
>>> Is this happening now? My predefined IP got released when I unsubscribed to
>>> the cartridge.
>>>
>>
>> AFAIK we have to release an IP, only if we allocate manually.
>>
>
> We are not exactly doing it. So when we associate an floating IP to an
> instance, we are retrieving all the available floating IPs, shuffle them
> and associate the last floating IP to the instance. If there are no
> available floating IPs, we are allocating one and associate to the
> instance. These two scenario is considered as allocated IPs in stratos.
> What I meant here is that, we are putting IPs from these two scenario into
> allocatedIpAddress. So when terminate the instance, we are releasing these.
> It means we are sometimes releasing IPs even though we didn't allocate
> them. But that is not a harm. That is another problem.
>
> My concern is that are we releasing predefined floating IPs too? If so,
> the user will not able to unsubscribe and subscribe it to this cartridge
> again. Since the IP is not there, stratos will raise an error. Then he has
> to manually allocate a floating IP in openstack and then use that IP in
> cartridge json. I feel this is not good .
>
> What I wanted to know is, are we releasing or not releasing the predefined
> floating IPs?
>
> Thanks.
>
>>
>>> Jclouds API doc;
>>>    /**
>>>     * destroy the node, given its id. If it is the only node in a tag
>>> set, the dependent resources
>>>     * will also be destroyed.
>>>     */
>>>    void destroyNode(String id);
>>>
>>> So I guess all the floating IPs associated with the ports of this node
>>> will also be released right?
>>>
>>> Or can we set any property to prevent Jclouds from releasing floating
>>> IPs?
>>>
>>
>> Please raise this in Jclouds user list and get clarified.
>>
>>>
>>> Thanks.
>>>
>>> --
>>> Rajkumar Rajaratnam
>>> Committer & PMC Member, Apache Stratos
>>> Software Engineer, WSO2
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Rajkumar Rajaratnam
> Committer & PMC Member, Apache Stratos
> Software Engineer, WSO2
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Reply via email to