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

Ignasi Barrera commented on JCLOUDS-1426:
-----------------------------------------

As [~andreaturli] said, currently jclouds reads the {{ipAddress}} and 
{{privateIpAddress}} fields of the 
[RunningInstence|https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Instance.html]
 type to populate the ips of the  node (See 
[here|https://github.com/jclouds/jclouds/blob/master/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadata.java#L116-L119}.

To fix this, instead, jclouds should be calling the AWS API to get all the NICs 
attached to the instance and get those IPs.

If no one has still stepped in to fix this, is probably due to lack of cycles 
to spend on this. If you were willing to give it a try, we would be more than 
happy to provide help and guidance so you can contribute the fix.



> Jclouds does not return all private ip address of aws ec2 instance
> ------------------------------------------------------------------
>
>                 Key: JCLOUDS-1426
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1426
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-compute
>    Affects Versions: 2.0.3
>         Environment: AWS EC2
>            Reporter: Dushyant Gupta
>            Assignee: Andrea Turli
>            Priority: Major
>
> I have made use of apache jclouds library to fetch ec2 instance details. I 
> have attached 2 network interfaces on a single ec2 instance to provide it 2 
> IPs.
> [!https://i.stack.imgur.com/xSHU3.png!|https://i.stack.imgur.com/xSHU3.png]
> But from the following code of jclouds, I see only one IP (of primary 
> interface [eth0]) getting retrieved.
> {{    ComputeService cs = computeContext.getComputeService(); }}
> {{    for (ComputeMetadata cm : cs.listNodes()){ }}
> {{        NodeMetadata nm = (NodeMetadata) cm; }}
> {{        System.out.println(nm); }}
> {{    }}}
>  
> In the output I can see only one IP address:
> {quote}privateAddresses=[172.26.119.234]
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to