Re: [jclouds/jclouds] Uses default password with conflictive characters (#1207)

2018-05-17 Thread Andrew Phillips
Thanks for taking care of the merging and cherry-picking, Ignasi!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1207#issuecomment-390093278

[jira] [Created] (JCLOUDS-1420) insert waiting time before tagging ec2 instances

2018-05-17 Thread Haisum Mussawir (JIRA)
Haisum Mussawir created JCLOUDS-1420:


 Summary: insert waiting time before tagging ec2 instances
 Key: JCLOUDS-1420
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1420
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-compute
Affects Versions: 1.9.0
Reporter: Haisum Mussawir


When EC2ComputeService.createNodesInGroup method is called it tries to apply 
tags immediately after instance creation. This results in 
InvalidInstanceID.NotFound  sometimes. This is because of eventual consistency 
in Amazon APIs as documented at 
[https://docs.aws.amazon.com/AWSEC2/latest/APIReference/query-api-troubleshooting.html]
 :
{quote}The following are examples of error codes you may encounter as a result 
of eventual consistency.
{quote}
{quote} * InvalidInstanceID.NotFound

If you successfully run the RunInstances command, and then immediately run 
another command using the instance ID that was provided in the response of 
RunInstances, it may return an InvalidInstanceID.NotFound error. This does not 
mean the instance does not exist.
{quote}

A similar issue was reported and fixed in Apache Spark at 
https://github.com/apache/spark/pull/3986. It was resolved by putting some wait 
between create instance and tagging code. I think same may be needed here. I am 
using jclouds 1.9.0 and couldn't see any changes that address this issue in 
latest code. 



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


Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-17 Thread Daniel Estévez
Some context about what @nacx is talking about 
https://stackoverflow.com/questions/50068324/azure-arm-api-returns-locations-with-inconsistent-case

It affects also other of the new regions (not only CanadaEast) and working on 
it we discovered some unrelated issues like this one with the default 
credentials. As a separate JIRA from the case insensitive support for this 
provider.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1210#issuecomment-389909740

Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-17 Thread Ignasi Barrera
Well, yes and no :) @danielestevez is working on fixing jclouds to properly 
support Azure CanadaEast region. The issue is that the Azure API sometimes 
returns the region name lowercase, sometimes camelcase, etc, and that messes 
things up when it comes to filter by location and do several location 
comparisons jclouds does internally. We still don't know the real scope of this 
change, but I'm confident it is under control and it won't be a huge deal :)

The image without credentials thing is just isolated to this PR, so I think it 
is safe to merge (but I'll file a JIRA too).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1210#issuecomment-389906939

Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-17 Thread Andrea Turli
@nacx that sounds like a decent amount of work, I think we should file a jira 
issue and properly track the change in the next release notes (ideally with a 
blog post!) - wdyt?

didn't have time yet to review the PR, I'll do asap!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1210#issuecomment-389904512

Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-17 Thread Daniel Estévez
Good to know!
Then i guess it's again another problem with the caseInsensitive feature since 
i always try in one of the problematic regions **CanadaEast**
Will investigate further

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1210#issuecomment-389883645

Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-17 Thread Ignasi Barrera
>However testImageIsRemovedFromCacheAfterDeletion still fails it 
>testSpawnNodeFromImage is enabled but that's a different issue.

I've just run the `AzureComputeImageExtensionLiveTest` in `northeurope` and 
with this change all pass:

```bash
Running 
org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest
Configuring TestNG with: TestNG652Configurator
Starting test 
testCreateImage(org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest)
[pool-1-thread-1] Test 
testCreateImage(org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest)
 succeeded: 423843ms
Test suite progress: tests succeeded: 1, failed: 0, skipped: 0.
Starting test 
testImageIsCachedAfterBeingCreated(org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest)
Starting test 
testSpawnNodeFromImage(org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest)
[pool-1-thread-2] Test 
testImageIsCachedAfterBeingCreated(org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest)
 succeeded: 95495ms
Test suite progress: tests succeeded: 2, failed: 0, skipped: 0.
[pool-1-thread-3] Test 
testSpawnNodeFromImage(org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest)
 succeeded: 442300ms
Test suite progress: tests succeeded: 3, failed: 0, skipped: 0.
Starting test 
testDeleteImage(org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest)
[pool-1-thread-4] Test 
testDeleteImage(org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest)
 succeeded: 10365ms
Test suite progress: tests succeeded: 4, failed: 0, skipped: 0.
Starting test 
testImageIsRemovedFromCacheAfterDeletion(org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest)
[pool-1-thread-5] Test 
testImageIsRemovedFromCacheAfterDeletion(org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest)
 succeeded: 99238ms
Test suite progress: tests succeeded: 5, failed: 0, skipped: 0.
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1,183.506 sec - 
in 
org.jclouds.azurecompute.arm.compute.extensions.AzureComputeImageExtensionLiveTest

Results :

Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1210#issuecomment-389882496

Re: [jclouds/jclouds] Removes check for group name when deleting (#1202)

2018-05-17 Thread Ignasi Barrera
Thanks, @danielestevez. I've just added a comment to your commit.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1202#issuecomment-389865682

Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-17 Thread Ignasi Barrera
nacx commented on this pull request.



> +  // Otherwise fallback to the image default credentials strategy
+  if (template instanceof CloneImageTemplate) {
+ final CloneImageTemplate cloneImageTemplate = (CloneImageTemplate) 
template;
+ future = Futures.transform(future, new Function() {
+@Override
+public Image apply(Image input) {
+   if (input.getDefaultCredentials() != null) {
+  return input;
+   }
+   Credentials nodeCredentials = credentialStore.get("node#" + 
cloneImageTemplate.getSourceNodeId());
+   if (nodeCredentials != null) {
+  logger.info(">> Adding node(%s) credentials to 
image(%s)...", cloneImageTemplate.getSourceNodeId(),
+cloneImageTemplate.getName());
+  return ImageBuilder.fromImage(input)
+
.defaultCredentials(LoginCredentials.fromCredentials(nodeCredentials)).build();
+   } else {

Addressed in the last commit. Thanks for having a look!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1210#discussion_r188862909

Re: [jclouds/jclouds] Add default credentials to images created by the ImageExtension (#1210)

2018-05-17 Thread Ignasi Barrera
@nacx pushed 1 commit.

3d44352  Add default credentials for all ImageTemplate types


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1210/files/c3022b688c614d5d9cec29a4901f843a48db146a..3d44352db38895533a608af059221816b3fb5ce8


Re: [jclouds/jclouds] Fixes assert for IpPermissions collection (#1209)

2018-05-17 Thread Ignasi Barrera
Merged to 
[master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/a918550e) and 
[2.1.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/6edb99c6).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1209#issuecomment-389768857

Re: [jclouds/jclouds] Fixes assert for IpPermissions collection (#1209)

2018-05-17 Thread Ignasi Barrera
Closed #1209.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1209#event-1631251748

Re: [jclouds/jclouds] Uses default password with conflictive characters (#1207)

2018-05-17 Thread Ignasi Barrera
Closed #1207.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1207#event-1631249749

Re: [jclouds/jclouds] Fixes Run SSH script for passwords with special characters (#1205)

2018-05-17 Thread Ignasi Barrera
Cherry-picked to 
[2.1.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/889a7f1d).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1205#issuecomment-389768687

Re: [jclouds/jclouds] Uses default password with conflictive characters (#1207)

2018-05-17 Thread Ignasi Barrera
Merged to 
[master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/bdb9a3af) and 
[2.1.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/45230c87). Thanks!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1207#issuecomment-389768566