[jira] [Created] (STRATOS-1054) Stratos should not release(delete) predefined floating IPs

2014-12-24 Thread Rajkumar Rajaratnam (JIRA)
Rajkumar Rajaratnam created STRATOS-1054: Summary: Stratos should not release(delete) predefined floating IPs Key: STRATOS-1054 URL: https://issues.apache.org/jira/browse/STRATOS-1054 Project

Re: Stratos should not release(delete) predefined floating IPs?

2014-12-24 Thread Rajkumar Rajaratnam
Hi Devs, Created a JIRA to track this for FUTURE releases. https://issues.apache.org/jira/browse/STRATOS-1054 Thanks. On Fri, Nov 21, 2014 at 5:41 PM, Nirmal Fernando wrote: > Great! Please check on other IaaSes too. > > On Fri, Nov 21, 2014 at 12:03 PM, Rajkumar Rajaratnam > wrote: > >> Pro

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Rajkumar Rajaratnam
Proposed solution is working perfectly. I will do the changes when I have time. Thanks. On Fri, Nov 21, 2014 at 3:07 PM, Rajkumar Rajaratnam wrote: > > > On Fri, Nov 21, 2014 at 3:02 PM, Nirmal Fernando > wrote: > >> >> >> On Fri, Nov 21, 2014 at 10:27 AM, Rajkumar Rajaratnam > > wrote: >> >>

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Rajkumar Rajaratnam
On Fri, Nov 21, 2014 at 3:02 PM, Nirmal Fernando wrote: > > > On Fri, Nov 21, 2014 at 10:27 AM, Rajkumar Rajaratnam > wrote: > >> Yes Nirmal. >> >> There is a way. >> >> If we disassociate the floating IP before calling destroyNode(), it will >> not be released right? >> > > Can you try and see.

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Nirmal Fernando
On Fri, Nov 21, 2014 at 10:27 AM, Rajkumar Rajaratnam wrote: > Yes Nirmal. > > There is a way. > > If we disassociate the floating IP before calling destroyNode(), it will > not be released right? > Can you try and see.. I am not sure whether it'll work or not. > > So what I am suggesting is, f

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Rajkumar Rajaratnam
Yes Nirmal. There is a way. If we disassociate the floating IP before calling destroyNode(), it will not be released right? So what I am suggesting is, for predefined floating IPs, we should disassociate the floating IPs before destroying the node. However, I might be wrong in going through the

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Nirmal Fernando
Ok, thanks.. so what are you suggesting to do? Is there anyway to avoid this deletion inside destroyNode? On Fri, Nov 21, 2014 at 10:08 AM, Rajkumar Rajaratnam wrote: > What EC2DestroyNodeStrategy#destroyNode() will do is; > >@Override >public NodeMetadata destroyNode(String id) { >

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Rajkumar Rajaratnam
On Fri, Nov 21, 2014 at 2:38 PM, Rajkumar Rajaratnam wrote: > What EC2DestroyNodeStrategy#destroyNode() will do is; > >@Override >public NodeMetadata destroyNode(String id) { > String[] parts = AWSUtils.parseHandle(id); > String region = parts[0]; > String instanceId = p

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Rajkumar Rajaratnam
And what we have in VCloudIaas#releaseAddress() in stratos is; @Override public void releaseAddress(String ip) { // TODO } :) Thanks. On Fri, Nov 21, 2014 at 2:38 PM, Rajkumar Rajaratnam wrote: > What EC2DestroyNodeStrategy#destroyNode() will do is; > >@Override >pub

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Rajkumar Rajaratnam
What EC2DestroyNodeStrategy#destroyNode() will do is; @Override public NodeMetadata destroyNode(String id) { String[] parts = AWSUtils.parseHandle(id); String region = parts[0]; String instanceId = parts[1]; // TODO: can there be multiple? releaseAnyPublicIpFor

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Nirmal Fernando
This is in Openstack, right?. From my view this is bug in Jclouds Openstack module. Please check AWS-EC2 module code too. On Fri, Nov 21, 2014 at 10:04 AM, Rajkumar Rajaratnam wrote: > What is there in that method is; > >@Override >public ZoneAndId apply(ZoneAndId id) { > FloatingI

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Rajkumar Rajaratnam
What is there in that method is; @Override public ZoneAndId apply(ZoneAndId id) { FloatingIPApi floatingIpApi = novaApi.getFloatingIPExtensionForZone(id.getZone()).get(); for (FloatingIP ip : floatingIpCache.getUnchecked(id)) { logger.debug(">> removing floatingIp(%s) fr

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Nirmal Fernando
Do they delete IP from the removeFloatingIpFromNodeAndDeallocate method? Also, we need to make sure all the IaaSes do this, we can't only check in Openstack and do anything. I think what we currently do is, let destroyNode disassociate the IP from the instance and then only we would release the I

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-21 Thread Rajkumar Rajaratnam
I went though Jclouds code base and found that destroyNode() will deallocate and release(delete) all floating IPs associated with the instance. The following method is in the NovaComputeServiceAdapter class. @Override public void destroyNode(String id) { ZoneAndId zoneAndId = ZoneAndI

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-20 Thread Rajkumar Rajaratnam
Anyone tried with a predefined floating IP and got the floating IP disassociated (not released) when unsubscribing to the cartridge? Thanks. On Fri, Nov 21, 2014 at 12:44 PM, Rajkumar Rajaratnam wrote: > Hi, > > I have commented out IP releasing code segment and unsubscribed from a > cartridge.

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-20 Thread Rajkumar Rajaratnam
Hi, I have commented out IP releasing code segment and unsubscribed from a cartridge. Floating IPs allocated to that instance were released(deleted). So I guess, Jclouds' BasicComputeService#destroyNode(String id) is releasing the floating IPs too. So predefined floating IPs will also be removed.

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-20 Thread Rajkumar Rajaratnam
Hi Nirmal, Please have a look at associateAddress(NodeMetadata node) @ [1]. This method either allocate an IP or using an available IP. So what we setting to allocatedIPAddress can be either an allocated one or an available one right? Am I missing something here? 1. https://github.com/apache/str

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-20 Thread Nirmal Fernando
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/CloudControllerS

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-20 Thread Rajkumar Rajaratnam
Hi Nirmal, On Fri, Nov 21, 2014 at 11:46 AM, Nirmal Fernando wrote: > > > On Fri, Nov 21, 2014 at 6:24 AM, Rajkumar Rajaratnam > wrote: > >> Hi devs, >> >> We have the following fields in Member Context; >> >> // private ip private String privateIpAddress; // public ip private >> String publ

Re: Stratos should not release(delete) predefined floating IPs?

2014-11-20 Thread Nirmal Fernando
On Fri, Nov 21, 2014 at 6:24 AM, Rajkumar Rajaratnam 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

Stratos should not release(delete) predefined floating IPs?

2014-11-20 Thread Rajkumar Rajaratnam
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 terminat