[ 
https://issues.apache.org/jira/browse/JCLOUDS-540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13979672#comment-13979672
 ] 

Ignasi Barrera commented on JCLOUDS-540:
----------------------------------------

An initial research using the {{aws-ec2}} provider shows that there are more 
things to change in order to be completely "region-failure tolerant", or to be 
able to work with the nodes of just one region.

I've simulated a region failure like this:

{code}
echo "1.1.1.1 ec2.us-east-1.amazonaws.com" >> /etc/hosts 
{code}

And deployed several nodes sin other regions. Despite using the 
{{computeService.getNodeMetadata}} or similar methods that require the ID of 
the node, jclouds fails, as some pieces that are internally used by the 
provider (such as the {{RunningInstanceToNodeMetadata}} function used to 
transform the AWS instance object to the jclouds portable model) still try to 
reach *all* the locations.

This can potentially happen everywhere where the Location supplier is injected, 
if it tries to connect to every location. We should review the uses of that 
supplier and see if we can do it better so jclouds only tries to connect to the 
locations that are actually related to the operation being executed.

> Allow to list nodes of a concrete Location in the ComputeService
> ----------------------------------------------------------------
>
>                 Key: JCLOUDS-540
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-540
>             Project: jclouds
>          Issue Type: Improvement
>          Components: jclouds-compute
>    Affects Versions: 1.7.2
>            Reporter: Ignasi Barrera
>            Assignee: Ignasi Barrera
>             Fix For: 1.8.0
>
>
> The ComputeService only offers the following methods to get the information 
> of the existing nodes:
> * listNodes
> * listNodesByIds
> * getNodeMetadata
> Those are OK to get all the nodes in all locations, or only certain nodes one 
> knows in advance, but are not enough if one wants to work only with a 
> concrete location, which can be quite a common use case.
> In cases where the provider disables a location (this happens quite often in 
> DigitalOcean depending on their load) or when a region experiences failures 
> (this happened in AWS more often than it would be desirable), it could be of 
> great help to have a way in the ComputService to scope the operations to a 
> concrete location. For example, when a region in AWS fails, right now one 
> can't list the nodes in other locations using the ComputeService, and this is 
> something that should be fixed.
> Adding the following method should be enough:
> * listNodesInLocation(int locationId)
> But the locationId parameter could also be added to the "runScriptOnNodes" if 
> needed. Please, use this issue to discuss the implementation and the scope of 
> the changes!



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to