Re: Issue with jclouds computeService listNodes() ?

2018-06-21 Thread archieprad
This is great! Thank you! Cheers Archana On 2018/06/21 08:39:58, Ignasi Barrera wrote: > FTR, I'm not a user of the SimianArmy, but I've just opened a PR to add > support for temporary credentials: > https://github.com/Netflix/SimianArmy/pull/331 > > On 21 June 2018 at 10:14, archiep...@gmail.

Re: Issue with jclouds computeService listNodes() ?

2018-06-21 Thread Ignasi Barrera
FTR, I'm not a user of the SimianArmy, but I've just opened a PR to add support for temporary credentials: https://github.com/Netflix/SimianArmy/pull/331 On 21 June 2018 at 10:14, archiep...@gmail.com wrote: > Hi Ignasi, > Thank you! I will try this out and let you know if it worked. > > Cheers

Re: Issue with jclouds computeService listNodes() ?

2018-06-21 Thread archieprad
Hi Ignasi, Thank you! I will try this out and let you know if it worked. Cheers Archana On 2018/06/21 08:00:01, Ignasi Barrera wrote: > Hi Archana, > > I see the problem here. When using temporary credentials in AWS, the > session token must be included in a request header [1], so you need to

Re: Issue with jclouds computeService listNodes() ?

2018-06-21 Thread archieprad
Hi Andrea, Yes i changed the code a little and added a .endpoint("https://ec2-ap-southeast-1.com";), to change the region. Does that resolve it? Regards Archana On 2018/06/21 07:53:48, Andrea Turli wrote: > Mmm very interesting! > > The only thing that comes to my mind is: > - is your accoun

Re: Issue with jclouds computeService listNodes() ?

2018-06-21 Thread Ignasi Barrera
Hi Archana, I see the problem here. When using temporary credentials in AWS, the session token must be included in a request header [1], so you need to provide it when configuring the jclouds context with the credentials. By default, the "ContextBuilder.credentials" signature does only allow to p

Re: Issue with jclouds computeService listNodes() ?

2018-06-21 Thread Andrea Turli
Mmm very interesting! The only thing that comes to my mind is: - is your account allowed to talk to all the regions? From the stacktrace above looks like org.jclouds.rest.AuthorizationException: POST https://ec2.us-east-1.amazonaws.com/ HTTP/1.1 -> HTTP/1.1 401 Unauthorized so maybe your account i

Re: Issue with jclouds computeService listNodes() ?

2018-06-21 Thread archieprad
Hi Andrea, Thanks for the quick response. I am using an IAM role that has full admin access. Which is why this case is even more perplexing. Do you have any other suggestions to try out? Cheers Archana On 2018/06/21 07:40:46, Andrea Turli wrote: > Archana, > > interesting! > > To debug th

Re: Issue with jclouds computeService listNodes() ?

2018-06-21 Thread archieprad
Hi Andrea, Thanks for the quick response. I am using an IAM role that has full admin access. Which is why this case is even more perplexing. Do you have any other suggestions to try out? Cheers Archana On 2018/06/20 21:45:31, archiep...@gmail.com wrote: > Hi Ignasi, > So the function that doe

Re: Issue with jclouds computeService listNodes() ?

2018-06-21 Thread Andrea Turli
Archana, interesting! To debug this, I would attach a IAM role with e.g the AmazonEC2FullAccess policy set and re-test. If that works, I'll then try to play with more restricting policies, in case you don't like AmazonEC2FullAccess in production. Best, Andrea On Thu, Jun 21, 2018 at 9:34 AM arc

Re: Issue with jclouds computeService listNodes() ?

2018-06-21 Thread archieprad
Hi Andrea, I tried the two methods that you suggested and neither of them work. I also tried another method listHardwareProfiles() and it works. Is there some different level of authentication required across these? Please do let me know what you think. Cheers Archana On 2018/06/20 07:26:44,

Re: Issue with jclouds computeService listNodes() ?

2018-06-20 Thread archieprad
Hi Ignasi, So the function that does the authentication uses a context builder and generates a temporary access and secret key. I've read that perhaps Jclouds might not be sending the session token to access aws resources. Do you think that is what could be happening? Cheers, Archana

Re: Issue with jclouds computeService listNodes() ?

2018-06-20 Thread Ignasi Barrera
Hi Archana, There is no explicit support to pass the IAM role based authentication when creating the jclouds context. It has to be created with the access and secret key. I don't know the internals of the simian army, but if you have access to the instance metadata you could query it to get the ac

Re: Issue with jclouds computeService listNodes() ?

2018-06-20 Thread archieprad
Hi Andrea, Thanks for the reply. I am somewhat new ( learning today) to Jclouds. But after facing this issue for the past 2 days and reading some blog posts, a lot of places say it might be an IAM role issue. Here is the stacktrace: 2018-06-18 03:52:56.701 - WARN ChaosInstance - [ChaosInstance.

Re: Issue with jclouds computeService listNodes() ?

2018-06-20 Thread Andrea Turli
Hi Archana, I don't see any particular reason listNodes would behave differently when using IAM role vs Access Key and Secret Key - Once the Ec2Api is configured to use org.jclouds.aws.domain.SessionCredentials everything should just work. Is listNodes the only failing one? Can you share the sta

Issue with jclouds computeService listNodes() ?

2018-06-19 Thread archieprad
Hi All, I am trying to SSH from one EC2 instance into another using netflix's simian army. I am using IAM role instead of Access key and Secret key. Wondering if there is an issue with calling listNodes() when using IAM role. Any insight on this, or any workaround on the issue is helpful. Cheer