> @@ -94,6 +97,12 @@ public boolean apply(FloatingIP arg0) {
>           // try to prevent multiple parallel launches from choosing the same 
> ip.
>           Collections.shuffle(unassignedIps);
>           ip = Iterables.getLast(unassignedIps);
> +         
> +         //if we are still unable to allocate IP, even after iterating 
> through all 
> +         //available, then re-throw IRE as there is nothing left we can do
> +         if(ip == null){
> +         throw new InsufficientResourcesException("Failed to allocate a 
> FloatingIP for node(" + node.getId() + ")",e);
> +         }
>        }
>        logger.debug(">> adding floatingIp(%s) to node(%s)", ip.getIp(), 
> node.getId());

It does NOT get turned into a RunNodesException higher up as it fails before 
the point the RNE is created (which happens in BaseComputeService around line 
222). Let me play around a bit and see what I can make happen. I still think 
this is the right exception to throw but we should be able to capture it and 
embed it within an RNE.

As far as putting code out to a method: doing that now ;)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/425/files#r14409632

Reply via email to