You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Andrea Turli <no...@github.com> on 2015/08/13 12:00:06 UTC

[jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

- fix reuse of existing storage service during deployment
- use AutoValue.Builder in DeployParams
- make network creation optional
- remove AzureComuteAdapterLiveTest b/c not meaningful
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/197

-- Commit Summary --

  * [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions

-- File Changes --

    M azurecompute/src/main/java/org/jclouds/azurecompute/AzureComputeProviderMetadata.java (2)
    M azurecompute/src/main/java/org/jclouds/azurecompute/binders/DeploymentParamsToXML.java (22)
    M azurecompute/src/main/java/org/jclouds/azurecompute/compute/AzureComputeServiceAdapter.java (31)
    M azurecompute/src/main/java/org/jclouds/azurecompute/compute/config/AzureComputeServiceContextModule.java (2)
    A azurecompute/src/main/java/org/jclouds/azurecompute/compute/options/AzureComputeTemplateOptions.java (454)
    M azurecompute/src/main/java/org/jclouds/azurecompute/compute/strategy/GetOrCreateStorageServiceAndVirtualNetworkThenCreateNodes.java (157)
    M azurecompute/src/main/java/org/jclouds/azurecompute/domain/DeploymentParams.java (167)
    D azurecompute/src/main/java/org/jclouds/azurecompute/options/AzureComputeTemplateOptions.java (344)
    M azurecompute/src/main/java/org/jclouds/azurecompute/util/ConflictManagementPredicate.java (7)
    M azurecompute/src/test/java/org/jclouds/azurecompute/AzureComputeProviderMetadataLive.java (7)
    A azurecompute/src/test/java/org/jclouds/azurecompute/binders/DeploymentParamsToXMLTest.java (65)
    D azurecompute/src/test/java/org/jclouds/azurecompute/compute/AzureComputeServiceAdapterLiveTest.java (177)
    M azurecompute/src/test/java/org/jclouds/azurecompute/compute/AzureComputeServiceContextLiveTest.java (104)
    M azurecompute/src/test/java/org/jclouds/azurecompute/features/DeploymentApiLiveTest.java (19)
    M azurecompute/src/test/java/org/jclouds/azurecompute/features/DeploymentApiMockTest.java (10)
    M azurecompute/src/test/java/org/jclouds/azurecompute/features/VMImageApiLiveTest.java (28)
    M azurecompute/src/test/java/org/jclouds/azurecompute/features/VirtualMachineApiLiveTest.java (13)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/197.patch
https://github.com/jclouds/jclouds-labs/pull/197.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
>The API has changed in the meantime.

Right, in the image cache commit I changed how extensions are registered to [this](https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/config/BaseComputeServiceContextModule.java#L304-L316). We can ask Guice if there is a binding for the extensions instead of overriding the method in each provider that implements them. Easier for the providers!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173234493

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Francesco Chicchiriccò <no...@github.com>.
@andreaturli I believe `AzureComputeServiceLiveTest#testListSizes` is essential, but if you could also try to investigate why `AzureComputeServiceContextLiveTest#testLaunchNodes` is failing when run with all other tests...

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-135748450

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
this is the current situation now:

```
Failed tests: 
  AzureComputeSecurityGroupExtensionLiveTest>BaseSecurityGroupExtensionLiveTest.testAddIpPermission:145 » IllegalArgument
  VMImageApiLiveTest.setup:97 RoleInstance{roleName=andrea253-vmimageapilivetest, instanceName=andrea253-vmimageapilivetest, instanceStatus=ROLE_STATE_UNKNOWN, powerState=STARTING, instanceUpgradeDomain=0, instanceFaultDomain=0, instanceSize=BASIC_A2, ipAddress=100.115.60.39, hostname=null, instanceEndpoints=[InstanceEndpoint{name=tcp_22-22, vip=40.113.159.195, publicPort=22, localPort=22, protocol=tcp}]} expected [true] but found [false]
  AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testListSizes:847 {id=A10, providerId=A10, name=A10, processors=[{cores=8.0, speed=2.0}], ram=57344, hypervisor=Hyper-V, supportsImage=ALWAYS_TRUE}

Tests run: 100, Failures: 3, Errors: 0, Skipped: 10
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-132536120

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Josef Cacek <no...@github.com>.
The Azure build finished without problems.
```
Tests run: 140, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.327 sec - in TestSuite
```
The build timed out in jdbc module:

```
...
Build timed out (after 20 minutes). Marking the build as aborted.

Results :

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

[ERROR] There was a timeout or other error in the fork
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache jclouds labs ............................... SUCCESS [25.988s]
[INFO] jclouds azure compute API ......................... SUCCESS [1:06.736s]
[INFO] jclouds etcd api .................................. SUCCESS [8.013s]
[INFO] jclouds docker API ................................ SUCCESS [18.632s]
[INFO] jclouds cdmi api .................................. SUCCESS [11.888s]
[INFO] jclouds CloudSigma v2 API ......................... SUCCESS [38.456s]
[INFO] jclouds CloudSigma v2 Honolulu Provider ........... SUCCESS [3.402s]
[INFO] jclouds CloudSigma v2 Las Vegas Provider .......... SUCCESS [3.662s]
[INFO] jclouds CloudSigma v2 Miami Provider .............. SUCCESS [3.386s]
[INFO] jclouds CloudSigma v2 San Jose Provider ........... SUCCESS [3.459s]
[INFO] jclouds CloudSigma v2 Washington DC Provider ...... SUCCESS [3.432s]
[INFO] jclouds CloudSigma v2 Zurich Provider ............. SUCCESS [3.718s]
[INFO] jclouds DigitalOcean v2 API Provider .............. SUCCESS [23.216s]
[INFO] jclouds jdbc core ................................. FAILURE [15:56.441s]
...
```

@nacx Could you restart the build?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173179117

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
Closed #197.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#event-517768465

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Francesco Chicchiriccò <no...@github.com>.
I've seen the changes and they seem ok.

I had to fix 
```
src/test/java/org/jclouds/azurecompute/binders/DeploymentParamsToXMLTest.java
```

by changing

```
import autovalue.shaded.com.google.common.common.collect.ImmutableSet;
```

to


```
import com.google.common.collect.ImmutableSet;
```

Moreover, I get the following warnings during compilation:

```
/home/ilgrosso/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar(com/google/common/util/concurrent/Monitor.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy': class file for javax.annotation.concurrent.GuardedBy not found
/home/ilgrosso/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar(com/google/common/util/concurrent/Monitor.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
/home/ilgrosso/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar(com/google/common/util/concurrent/Monitor.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
/home/ilgrosso/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar(com/google/common/util/concurrent/Monitor.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
/home/ilgrosso/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar(com/google/common/util/concurrent/Monitor.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
/home/ilgrosso/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar(com/google/common/util/concurrent/Monitor.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
/home/ilgrosso/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar(com/google/common/util/concurrent/Monitor.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
/home/ilgrosso/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar(com/google/common/util/concurrent/Monitor.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
/home/ilgrosso/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar(com/google/common/util/concurrent/Monitor.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 warnings
```

Now I am running the live tests: I'll report here the results.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-130645113

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
I think my best run with azurecompute was Failures: 5 Errors:0 Skipped: 0

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-172487960

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
> @@ -44,7 +45,7 @@ public AzureComputeProviderMetadataLive() {
>  
>     public static Properties defaultProperties() {
>        final Properties properties = AzureManagementApiMetadata.defaultProperties();
> -      properties.setProperty(TEMPLATE, "osFamily=UBUNTU,osVersionMatches=.*14\\.10,loginUser=jclouds,"
> +      properties.setProperty(TEMPLATE, "osVersionMatches=1[01234].[01][04],os64Bit=true,loginUser=jclouds,"

I  think so as it is adding props to AzureManagementApiMetadata

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

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
Closed #197.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#event-521028401

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
I'd like to merge it asap too. @andreaturli Which is the status of the PR and the tests? Do you believe it can be merged now?
Take into account that we'd need all them passing if we want to promote the provider to the main repo for 2.0.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-172472486

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
> @@ -106,7 +102,7 @@ public static ExternalEndpoint inboundUdpToLocalPort(final int port, final int l
>      */
>     public abstract OSImage.Type os();
>  
> -   public abstract List<ExternalEndpoint> externalEndpoints();
> +   @Nullable public abstract Set<ExternalEndpoint> externalEndpoints();

Nulllable collections are evil. Can't we return an empty one?

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

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
> @@ -44,7 +45,7 @@ public AzureComputeProviderMetadataLive() {
>  
>     public static Properties defaultProperties() {
>        final Properties properties = AzureManagementApiMetadata.defaultProperties();
> -      properties.setProperty(TEMPLATE, "osFamily=UBUNTU,osVersionMatches=.*14\\.10,loginUser=jclouds,"
> +      properties.setProperty(TEMPLATE, "osVersionMatches=1[01234].[01][04],os64Bit=true,loginUser=jclouds,"

Do we need to override it here if it matches the one in the provider metadata?

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

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
> @@ -105,10 +105,10 @@
>        final String location = template.getLocation().getId();
>        final int[] inboundPorts = template.getOptions().getInboundPorts();
>  
> -      final String storageAccountName = templateOptions.getStorageAccountName().get();
> -      final String virtualNetworkName = templateOptions.getVirtualNetworkName().get();
> -      final String reservedIPAddress = templateOptions.getReservedIPName().orNull();
> -      final String subnetName = templateOptions.getSubnetName().get();
> +      final String storageAccountName = templateOptions.getStorageAccountName();
> +      final String virtualNetworkName = templateOptions.getNetworks().isEmpty() ? null : Iterables.getOnlyElement(templateOptions.getNetworks());

AFAIK VM can be attached to one virtualNetwork only. I agree the end-user should be better notified

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

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
Backported to [1.9.x](https://git1-us-west.apache.org/repos/asf?p=jclouds-labs.git;a=commit;h=a57446a1c4962f80d98e5b9728c66fea01a49c2f)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173527890

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
> @@ -44,7 +45,7 @@ public AzureComputeProviderMetadataLive() {
>  
>     public static Properties defaultProperties() {
>        final Properties properties = AzureManagementApiMetadata.defaultProperties();
> -      properties.setProperty(TEMPLATE, "osFamily=UBUNTU,osVersionMatches=.*14\\.10,loginUser=jclouds,"
> +      properties.setProperty(TEMPLATE, "osVersionMatches=1[01234].[01][04],os64Bit=true,loginUser=jclouds,"

I think it does, something like
```
properties.setProperty(LocationConstants.PROPERTY_REGION, BaseAzureComputeApiLiveTest.LOCATION);
```
?

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

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
@ilgrosso my last commit should fix a bunch of things, specifically
```
testAddIpPermission(org.jclouds.azurecompute.compute.extensions.AzureComputeSecurityGroupExtensionLiveTest) 
testOptionToNotBlock(org.jclouds.azurecompute.compute.AzureComputeServiceLiveTest) 
```
*but*
```
testList(org.jclouds.azurecompute.features.DiskApiLiveTest) is still failing
```
and
```
testCreateAndRunAService(org.jclouds.azurecompute.compute.AzureComputeServiceLiveTest)
```
hanging for long time showing something like
```
-  << (jclouds:pw[cdfb4472683ad9b4f7e159935dbc439a]@xxx.xxx.xxx.xxx:22) acquired < session channel: id=4, recipient=1, localWin=[winSize=2097152], remoteWin=[winSize=0] >
```
not sure why. Seems like the jettyInstallation is hanging, maybe the new sshj driver?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-131078940

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
@nacx I think we can merge it as it is a good step ahead although it needs some more work for the LiveTests which we can tackle in a subsequent PR, wdyt?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-172486974

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
@andreaturli I think this one should be closed and merge #231. @kwart already took care of rebasing it and resolving the conflicts.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173379910

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
BTW, I aborted the build as it was stuck. Let's trigger a new build: rebuild please

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-157877628

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
I will asap

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173218137

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
t;dr: I think I've fixed `AzureComputeServiceLiveTest#testListSizes` and `AzureComputeServiceContextLiveTest#testLaunchNodes` as @ilgrosso was suggesting.

Here the current situation for the entire `LiveTests` suite:

```
Tests run: 99, Failures: 3, Errors: 0, Skipped: 14, Time elapsed: 3,972.34 sec <<< FAILURE! - in TestSuite
testAddIpPermission(org.jclouds.azurecompute.compute.extensions.AzureComputeSecurityGroupExtensionLiveTest)  Time elapsed: 10.993 sec  <<< FAILURE!
org.jclouds.http.HttpResponseException: command: PUT https://management.core.windows.net/341751b0-f348-45ce-9498-41cc68b4b45f/services/hostedservices/brooklyn-nwzrsw-yy-appli-ylsx-empty-mrro-39d/deployments/brooklyn-nwzrsw-yy-appli-ylsx-empty-mrro-39d/roles/brooklyn-nwzrsw-yy-appli-ylsx-empty-mrro-39d HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: [<Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>BadRequest</Code><Message>Duplicate input endpoint name(s) tcp_10-10 specified for role brooklyn-nwzrsw-yy-appli-ylsx-empty-mrro-39d.</Message></Error>]
	at org.jclouds.azurecompute.handlers.AzureComputeErrorHandler.handleError(AzureComputeErrorHandler.java:44)
	at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
	at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:136)
	at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:105)
	at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
	at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
	at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
	at com.sun.proxy.$Proxy82.updateRole(Unknown Source)
	at org.jclouds.azurecompute.compute.extensions.AzureComputeSecurityGroupExtension$6.operation(AzureComputeSecurityGroupExtension.java:267)
	at org.jclouds.azurecompute.util.ConflictManagementPredicate.apply(ConflictManagementPredicate.java:120)
	at org.jclouds.azurecompute.compute.extensions.AzureComputeSecurityGroupExtension.addIpPermission(AzureComputeSecurityGroupExtension.java:270)
	at org.jclouds.compute.extensions.internal.BaseSecurityGroupExtensionLiveTest.testAddIpPermission(BaseSecurityGroupExtensionLiveTest.java:144)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
	at org.testng.TestRunner.privateRun(TestRunner.java:767)
	at org.testng.TestRunner.run(TestRunner.java:617)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
	at org.testng.SuiteRunner.access$000(SuiteRunner.java:38)
	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382)
	at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

testCreateTwoNodesWithRunScript(org.jclouds.azurecompute.compute.AzureComputeServiceLiveTest)  Time elapsed: 855.97 sec  <<< FAILURE!
org.jclouds.compute.RunNodesException: error running 2 nodes group(azurecompute-) location(West Europe) image(b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_1-LTS-amd64-server-20150123-en-us-30GB) size(BASIC_A1) options(AzureComputeTemplateOptions{virtualNetworkName=null, subnetNames=[], storageAccountName=jcloudsbchsfqegxc, storageAccountType=null, networkSecurityGroupName=null, reservedIPName=null})
Execution failures:

0 error[s]
Node failures:

1) RuntimeException on node azurecompute--f25:
java.lang.RuntimeException: org.jclouds.compute.callables.ScriptStillRunningException: time up waiting 600s for BlockUntilInitScriptStatusIsZeroThenReturnOutput{commandRunner=RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete{node=azurecompute--f25, name=bootstrap, runAsRoot=true}} to complete. call get() on this exception to get access to the task in progress
	at com.google.common.base.Throwables.propagate(Throwables.java:160)
	at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.doCall(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:59)
	at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh.call(RunScriptOnNodeAsInitScriptUsingSsh.java:73)
	at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:121)
	at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:142)
	at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:49)
	at com.google.common.util.concurrent.Futures$1.apply(Futures.java:713)
	at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:861)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.jclouds.compute.callables.ScriptStillRunningException: time up waiting 600s for BlockUntilInitScriptStatusIsZeroThenReturnOutput{commandRunner=RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete{node=azurecompute--f25, name=bootstrap, runAsRoot=true}} to complete. call get() on this exception to get access to the task in progress
	at org.jclouds.compute.callables.BlockUntilInitScriptStatusIsZeroThenReturnOutput.get(BlockUntilInitScriptStatusIsZeroThenReturnOutput.java:194)
	at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.doCall(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:56)
	... 9 more
Caused by: java.util.concurrent.TimeoutException: Timeout waiting for task.
	at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:269)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:96)
	at org.jclouds.compute.callables.BlockUntilInitScriptStatusIsZeroThenReturnOutput.get(BlockUntilInitScriptStatusIsZeroThenReturnOutput.java:192)
	... 10 more


1 error[s]
	at org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:222)
	at org.jclouds.compute.internal.BaseComputeServiceLiveTest.testCreateTwoNodesWithRunScript(BaseComputeServiceLiveTest.java:342)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
	at org.testng.TestRunner.privateRun(TestRunner.java:767)
	at org.testng.TestRunner.run(TestRunner.java:617)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
	at org.testng.SuiteRunner.access$000(SuiteRunner.java:38)
	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382)
	at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

tearDown(org.jclouds.azurecompute.features.VirtualNetworkApiLiveTest)  Time elapsed: 1,065.917 sec  <<< FAILURE!
java.lang.NoSuchMethodError: org.jclouds.azurecompute.features.VirtualNetworkApiLiveTest.access$0(Lorg/jclouds/azurecompute/features/VirtualNetworkApiLiveTest;)Ljava/io/Closeable;
	at org.jclouds.azurecompute.features.VirtualNetworkApiLiveTest$1.operation(VirtualNetworkApiLiveTest.java:83)
	at org.jclouds.azurecompute.util.ConflictManagementPredicate.apply(ConflictManagementPredicate.java:120)
	at org.jclouds.azurecompute.features.VirtualNetworkApiLiveTest.tearDown(VirtualNetworkApiLiveTest.java:85)


Results :

Failed tests: 
  AzureComputeSecurityGroupExtensionLiveTest>BaseSecurityGroupExtensionLiveTest.testAddIpPermission:144 » HttpResponse
  AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testCreateTwoNodesWithRunScript:342 » RunNodes
  VirtualNetworkApiLiveTest.tearDown:85 » NoSuchMethod org.jclouds.azurecompute....

Tests run: 99, Failures: 3, Errors: 0, Skipped: 14

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:06 h
[INFO] Finished at: 2015-11-17T23:52:43+01:00
[INFO] Final Memory: 46M/494M
[INFO] ------------------------------------------------------------------------
```

To me, `AzureComputeSecurityGroupExtensionLiveTest>BaseSecurityGroupExtensionLiveTest.testAddIpPermission` is the real problem as that code can't work IMHO (maybe that test always failed?)

Can we merge this PR and fix the other liveTests in a subsequent PR?


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-157537990

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Josef Cacek <no...@github.com>.
@andreaturli I've just send the updated PR:)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173219366

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Francesco Chicchiriccò <no...@github.com>.
@nacx If nothing has changed since my latest comment, there are still a couple of relevant test failures

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-146432037

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
Pushed to [master](https://git1-us-west.apache.org/repos/asf?p=jclouds-labs.git;a=commit;h=f9b393de)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173386290

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
Use case 1 looks OK. The other two use cases seem to conflict with what is proposed in JCLOUDS-981, which aims to avoid the complexity of creating networks and let Azure assign an IP tot he VM, like other providers do?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-130689753

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
@nacx I've squashed and rebased this. Good to merge?


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-172493267

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
Thanks @ilgrosso 
Do you think we can merge this PR if I fix `AzureComputeServiceLiveTest#testListSizes` ?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-135748154

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
Then go ahead and merge it. what is the current status of the live tests btw?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-172487272

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Josef Cacek <no...@github.com>.
The API has changed in the meantime. 

@andreaturli Could you rebase this? (so the commit https://github.com/jclouds/jclouds-labs/commit/f67d2aa7bfb45a6448e8a49a46d12576b4ba5aa5 is included)

```
[INFO] Compiling 160 source files to /scratch/jenkins/workspace/jclouds-labs-pull-requests/azurecompute/target/classes
warning: No processor claimed any of these annotations: org.jclouds.rest.annotations.ResponseParser,com.google.inject.Singleton,javax.ws.rs.PUT,javax.ws.rs.Path,org.jclouds.rest.annotations.PayloadParam,javax.ws.rs.GET,javax.inject.Inject,org.jclouds.rest.annotations.ParamParser,org.jclouds.rest.annotations.Payload,javax.inject.Named,javax.annotation.Resource,com.google.inject.Provides,javax.ws.rs.POST,javax.ws.rs.PathParam,org.jclouds.rest.annotations.Delegate,javax.inject.Singleton,org.jclouds.rest.annotations.Headers,org.jclouds.location.Provider,org.jclouds.rest.annotations.BinderParam,com.google.inject.Inject,org.jclouds.rest.annotations.QueryParams,org.jclouds.rest.annotations.XMLResponseParser,org.jclouds.collect.Memoized,com.google.auto.value.AutoValue,com.google.auto.value.AutoValue.Builder,org.jclouds.javax.annotation.Nullable,javax.ws.rs.Consumes,org.jclouds.rest.annotations.SinceApiVersion,org.jclouds.rest.ConfiguresHttpApi,com.google.common.annotations.VisibleForTesting,
 javax.ws.rs.Produces,org.jclouds.rest.annotations.Fallback,javax.ws.rs.DELETE
warning: No processor claimed any of these annotations: org.jclouds.rest.annotations.SinceApiVersion,org.jclouds.javax.annotation.Nullable,javax.annotation.Generated
/scratch/jenkins/workspace/jclouds-labs-pull-requests/azurecompute/src/main/java/org/jclouds/azurecompute/compute/config/AzureComputeServiceContextModule.java:92: error: method does not override or implement a method from a supertype
   @Override
   ^
1 error
2 warnings
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173182466

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Francesco Chicchiriccò <no...@github.com>.
> To me, `AzureComputeSecurityGroupExtensionLiveTest>BaseSecurityGroupExtensionLiveTest.testAddIpPermission` is the real problem as that code can't work IMHO (maybe that test always failed?)

This test requires a clean environment; your error in fact is

`Duplicate input endpoint name(s) tcp_10-10 specified for role brooklyn-nwzrsw-yy-appli-ylsx-empty-mrro-39d`

> Can we merge this PR and fix the other liveTests in a subsequent PR?

Don't know, we used to have 3 tests failing at the beginning on this PR, and we still have 3 tests failing, no?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-157655368

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
> @@ -44,7 +45,7 @@ public AzureComputeProviderMetadataLive() {
>  
>     public static Properties defaultProperties() {
>        final Properties properties = AzureManagementApiMetadata.defaultProperties();
> -      properties.setProperty(TEMPLATE, "osFamily=UBUNTU,osVersionMatches=.*14\\.10,loginUser=jclouds,"
> +      properties.setProperty(TEMPLATE, "osVersionMatches=1[01234].[01][04],os64Bit=true,loginUser=jclouds,"

Oh, now I see you override the location here. 

Instead of hardcoding it, though, would it make sense to honor the "jclouds.region" property and put its value here, using the current one as the default? This will make easier to run the tests against a concrete location.

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

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
@ilgrosso could you please have a look? thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-130598543

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
Agree to merge the PR once we have the tests fixed. I agree this was not the initial purpose of the PR, but I think we should work towards promotion, and fixing the tests when we notice they fail is the better and fastest way to get that done.
This said, I'll make some room this week and try to help with the tests.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-157877424

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
> +
> +   @Override
> +   public AzureComputeTemplateOptions clone() {
> +      final AzureComputeTemplateOptions options = new AzureComputeTemplateOptions();
> +      copyTo(options);
> +      return options;
> +   }
> +
> +   @Override
> +   public void copyTo(final TemplateOptions to) {
> +      super.copyTo(to);
> +      if (to instanceof AzureComputeTemplateOptions) {
> +         final AzureComputeTemplateOptions eTo = AzureComputeTemplateOptions.class.cast(to);
> +         eTo.addressSpaceAddressPrefix(addressSpaceAddressPrefix);
> +         eTo.subnetName(subnetName);
> +         eTo.subnetName(networkSecurityGroupName);

Should be `eTo.networkSecurityGroupName`

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

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
@ilgrosso @nacx thanks for your reviews!

@nacx: re design concern: I changed the implementation to support the following 3 use-cases:
1. user-specified network name: jclouds checks its existence, otherwise IllegalArgumentException
2. user doesn't provide a networkName: jclouds looks for a suitable existing network in same location and matching a prefix
3. user doesn't provide a networkName and jclouds doesn't find a suitable existing network: it creates a new network generating a new name

At least this was the intent :)

Does it make more sense?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-130686058

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
@ilgrosso yes indeed. The idea of this PR was not to fix all of the failing live tests but to simplify the usage of the templateOptions and to make virtualNetwork optional when provisioning a VM, I think.

I think we need to make sure that we can run those tests even in a non-completely clean environment, as problems like `Duplicate input endpoint ...` may happen somewhere else, but I'm not sure we need to do it in this PR as it contains interesting enhancement IMHO that would be blocked otherwise. 



---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-157659442

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
Perhaps the timeout is due to [JCLOUDS-1060](https://issues.apache.org/jira/browse/JCLOUDS-1060)? rebuild please

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173179706

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
One design comment: the `tempalteOptions.networks` options is intended to be used to provide a set of *existing* network IDs where the virtual machine should be attached. Looking at the code, if the provided *thing* (as it can't be an ID if the network still does not exist) does not exists, it is created. Wasn't [JCLOUDS-981](https://issues.apache.org/jira/browse/JCLOUDS-981) about removing the need to create a network by default? Even if this fix does not aim to fix that, it does not seem like a move in the right direction, to get it fixed in the future?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-130684173

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
@ilgrosso and @nacx I've temporarily disabled a check in DiskLiveTest as I need to study more the Azure API.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-131080487

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Francesco Chicchiriccò <no...@github.com>.
@andreaturli here is my fresh results:

```
Results :

Failed tests: 
  AzureComputeSecurityGroupExtensionLiveTest>BaseSecurityGroupExtensionLiveTest.testAddIpPermission:144 » HttpResponse
  AzureComputeServiceContextLiveTest.testLaunchNodes:76 » RunNodes error running...
  AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testListSizes:847 {id=A10, providerId=A10, name=A10, processors=[{cores=8.0, speed=2.0}], ram=57344, hypervisor=Hyper-V, supportsImage=ALWAYS_TRUE}

Tests run: 98, Failures: 3, Errors: 0, Skipped: 4
```

Please note that:

 1. `AzureComputeSecurityGroupExtensionLiveTest#testAddIpPermission` is failing only because I can not clean up completely my subscription, so you should not care of this
 1. `AzureComputeServiceContextLiveTest#testLaunchNodes` is succeeding when run alone
 1.  When running `AzureComputeServiceLiveTest#testListSizes` alone I get
```
java.lang.AssertionError: {id=A10, providerId=A10, name=A10, processors=[{cores=8.0, speed=2.0}], ram=57344, hypervisor=Hyper-V, supportsImage=ALWAYS_TRUE}
        at org.jclouds.compute.internal.BaseComputeServiceLiveTest.testListSizes(BaseComputeServiceLiveTest.java:847)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
  ``` 
it seems that the failing line in `BaseComputeServiceLiveTest.java:847` is 
```
assert hardware.getVolumes().size() > 0 : hardware;
 ```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-134982222

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Josef Cacek <no...@github.com>.
@nacx Is there an ETA for merging this PR? We are not able to work with Azure without these changes.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-172472255

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
@andreaturli @ilgrosso what's left to be able to merge this PR?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-146320201

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
> +      }
> +
> +      /**
> +       * @see #subnetName
> +       */
> +      public static AzureComputeTemplateOptions subnetName(final String subnetName) {
> +         final AzureComputeTemplateOptions options = new AzureComputeTemplateOptions();
> +         return options.subnetName(subnetName);
> +      }
> +
> +      /**
> +       * @see #networkSecurityGroupName
> +       */
> +      public static AzureComputeTemplateOptions networkSecurityGroupName(final String networkSecurityGroupName) {
> +         final AzureComputeTemplateOptions options = new AzureComputeTemplateOptions();
> +         return options.subnetName(networkSecurityGroupName);

Should be  `options.networkSecurityGroupName(networkSecurityGroupName);`.

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

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
Ok, let's support properly use-case 1. In order to use a specific virtual network, the end user needs to specify the `virtualNetworkName` and 1-more `subnetNames`, so let's keep those specific `AzureComputeTemplateOptions`. 

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-130830295

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
> @@ -105,10 +105,10 @@
>        final String location = template.getLocation().getId();
>        final int[] inboundPorts = template.getOptions().getInboundPorts();
>  
> -      final String storageAccountName = templateOptions.getStorageAccountName().get();
> -      final String virtualNetworkName = templateOptions.getVirtualNetworkName().get();
> -      final String reservedIPAddress = templateOptions.getReservedIPName().orNull();
> -      final String subnetName = templateOptions.getSubnetName().get();
> +      final String storageAccountName = templateOptions.getStorageAccountName();
> +      final String virtualNetworkName = templateOptions.getNetworks().isEmpty() ? null : Iterables.getOnlyElement(templateOptions.getNetworks());

It does not seem OK to fail if there is more than one network provided. If the current implementation only allows to attach the VM to one network, then fail throwing an appropriate message so users know what's going on.
In any case, if we support the `networks` option we should allow to attach the VM to all provided networks.

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

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Francesco Chicchiriccò <no...@github.com>.
@andreaturli last time I have run the whole test suite (from the master branch), few months ago, all tests were succeeding - starting with an almost clean environment.

I haven't checked this lately, but IMO this PR should not be merged until at least the same results are achieved.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-157661112

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Francesco Chicchiriccò <no...@github.com>.
I have these 3 tests failing:
```
[TestNG] Test testAddIpPermission(org.jclouds.azurecompute.compute.extensions.AzureComputeSecurityGroupExtensionLiveTest) failed.
[TestNG] Test testList(org.jclouds.azurecompute.features.DiskApiLiveTest) failed.
[TestNG] Test testOptionToNotBlock(org.jclouds.azurecompute.compute.AzureComputeServiceLiveTest) failed.
```

but also
```
testCreateAndRunAService(org.jclouds.azurecompute.compute.AzureComputeServiceLiveTest)
```

hanging after a while without printing any visible error message.

I had to kill the test execution after 30 minutes, with the following situation:

```
Test suite progress: tests succeeded: 71, failed: 3, skipped: 4.
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-130665440

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
> @@ -126,140 +122,43 @@ public static ExternalEndpoint inboundUdpToLocalPort(final int port, final int l
>     @Nullable
>     public abstract String reservedIPName();
>  
> -   public abstract List<String> subnetNames();
> -
> -   public Builder toBuilder() {
> -      return builder().fromDeploymentParams(this);
> -   }
> +   @Nullable public abstract List<String> subnetNames();

Same thing about nullable collections.

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

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
Reopened #197.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#event-517768511

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Ignasi Barrera <no...@github.com>.
Good to merge. Great work here @andreaturli! Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-172494750

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
actually I did the same, waiting for the builder response now

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173381554

Re: [jclouds-labs] [JCLOUDS-982] remove Optional from AzureComputeTemplateOptions (#197)

Posted by Andrea Turli <no...@github.com>.
Sorry not sure I'm following. Do I need to rebase this one?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/197#issuecomment-173359730