Re: Problem spinning up instances on GCE with custom subnets

2017-05-24 Thread Ignasi Barrera
I'll be working on completing that PR and fixing this issue this week.

On 24 May 2017 at 09:23, Tomasz Wojtun  wrote:
> There is a pull request https://github.com/jclouds/jclouds/pull/1006 with the 
> functionality but it needs some tweaks.
>
> BR,
> Tomek
>
> On 24/05/2017, 08:42, "Fritz Elfert"  wrote:
>
> FYI: In the meantime, Ignasi mentioned to me:
> There is already https://issues.apache.org/jira/browse/JCLOUDS-1300
> which also covers the same problem.
>
> -Fritz
>
> On 24.05.2017 00:19, Joshua Forest wrote:
> > I need to be able to specify the subnetwork, is this possible in
> > jclouds?  I am using the jclouds-plugin on jenkins.  Fritz Effert (the
> > maintainer of that plugin) said he'd be watching the list and would
> > respond if he saw something come through, so here it is!
> >
> > May 19, 2017 6:57:46 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> > INFO: Provisioning new jclouds node
> > May 19, 2017 6:57:46 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> > INFO: Setting image id to 
> https://www.googleapis.com/compute/v1/projects/
> > 
> /global/images/
> > May 19, 2017 6:57:46 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> > INFO: Setting hardware Id to 
> https://www.googleapis.com/compute/v1/projects/
> > 
> /zones/europe-west1-c/machineTypes/n1-standard-1
> > May 19, 2017 6:57:46 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> > INFO: Setting location Id to europe-west1-c
> > May 19, 2017 6:57:46 PM org.jclouds.logging.jdk.JDKLogger logInfo
> > INFO: >> searching 
> params({imageId=https://www.googleapis.com/compute/v1/projects/
> > 
> /global/images/,
> > locationId=europe-west1-c,
> > hardwareId=https://www.googleapis.com/compute/v1/projects/
> > 
> /zones/europe-west1-c/machineTypes/n1-standard-1})
> > May 19, 2017 6:57:49 PM org.jclouds.logging.jdk.JDKLogger logInfo
> > INFO: << matched 
> image(https://www.googleapis.com/compute/v1/projects/
> > 
> /global/images/)
> > hardware(https://www.googleapis.com/compute/v1/projects/
> > 
> /zones/europe-west1-c/machineTypes/n1-standard-1)
> > location(europe-west1-c) May 19, 2017 6:57:49 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> > INFO: Setting networks to support
> > May 19, 2017 6:57:49 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> > INFO: Init script without private admin key. Falling back to 
> jenkins user credentials
> > May 19, 2017 6:57:49 PM org.jclouds.logging.jdk.JDKLogger logInfo
> > INFO: >> running 1 node group(jenkins-buildbox) 
> location(europe-west1-c) image(https://www.googleapis.com/compute/v1/projects/
> > 
> /global/images/)
> > hardwareProfile(https://www.googleapis.com/compute/v1/projects/
> > 
> /zones/europe-west1-c/machineTypes/n1-standard-1)
> > options({loginUser=admin, loginPrivateKeyPresent=true,
> > scriptPresent=true, userMetadata={Name=jenkins-buildbox},
> > networks=[support]}) May 19, 2017 6:57:50 PM 
> org.jclouds.logging.jdk.JDKLogger logInfo
> > INFO: >> adding node location(europe-west1-c) 
> name(jenkins-buildbox-143) image(6874878162127463719) hardware(3001)
> > May 19, 2017 6:57:50 PM org.jclouds.logging.jdk.JDKLogger logError
> > SEVERE: createNodesInGroup(jenkins-buildbox), completed: 0/1, 
> errors: 1, rate: 586ms/op
> > java.util.concurrent.ExecutionException: 
> org.jclouds.http.HttpResponseException: command: POST 
> https://www.googleapis.com/compute/v1/projects/
> > 
> /zones/europe-west1-c/instances
> > HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: [{
> > "error": {
> > "errors": [
> > {
> > "domain": "global",
> > "reason": "invalid",
> > "message": "Invalid value for field 
> 'resource.networkInterfaces[0]': ''.
> > Subnetwork should be specified for custom subnetmode network"
> > }
> > ],
> > "code": 400,
> > "message": "Invalid value for field 
> 'resource.networkInterfaces[0]': ''.
> > Subnetwork should be specified for custom subnetmode network"
> > }
> > }
> > ]
> > at 
> 

Re: Problem spinning up instances on GCE with custom subnets

2017-05-24 Thread Tomasz Wojtun
There is a pull request https://github.com/jclouds/jclouds/pull/1006 with the 
functionality but it needs some tweaks. 

BR, 
Tomek 

On 24/05/2017, 08:42, "Fritz Elfert"  wrote:

FYI: In the meantime, Ignasi mentioned to me:
There is already https://issues.apache.org/jira/browse/JCLOUDS-1300
which also covers the same problem.

-Fritz

On 24.05.2017 00:19, Joshua Forest wrote:
> I need to be able to specify the subnetwork, is this possible in
> jclouds?  I am using the jclouds-plugin on jenkins.  Fritz Effert (the
> maintainer of that plugin) said he'd be watching the list and would
> respond if he saw something come through, so here it is! 
> 
> May 19, 2017 6:57:46 PM 
jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Provisioning new jclouds node
> May 19, 2017 6:57:46 PM 
jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Setting image id to 
https://www.googleapis.com/compute/v1/projects/
> 
/global/images/
> May 19, 2017 6:57:46 PM 
jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Setting hardware Id to 
https://www.googleapis.com/compute/v1/projects/
> 
/zones/europe-west1-c/machineTypes/n1-standard-1
> May 19, 2017 6:57:46 PM 
jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Setting location Id to europe-west1-c
> May 19, 2017 6:57:46 PM org.jclouds.logging.jdk.JDKLogger logInfo
> INFO: >> searching 
params({imageId=https://www.googleapis.com/compute/v1/projects/
> 
/global/images/,
> locationId=europe-west1-c,
> hardwareId=https://www.googleapis.com/compute/v1/projects/
> 
/zones/europe-west1-c/machineTypes/n1-standard-1})
> May 19, 2017 6:57:49 PM org.jclouds.logging.jdk.JDKLogger logInfo
> INFO: << matched image(https://www.googleapis.com/compute/v1/projects/
> 
/global/images/)
> hardware(https://www.googleapis.com/compute/v1/projects/
> 
/zones/europe-west1-c/machineTypes/n1-standard-1)
> location(europe-west1-c) May 19, 2017 6:57:49 PM 
jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Setting networks to support
> May 19, 2017 6:57:49 PM 
jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Init script without private admin key. Falling back to jenkins 
user credentials
> May 19, 2017 6:57:49 PM org.jclouds.logging.jdk.JDKLogger logInfo
> INFO: >> running 1 node group(jenkins-buildbox) 
location(europe-west1-c) image(https://www.googleapis.com/compute/v1/projects/
> 
/global/images/)
> hardwareProfile(https://www.googleapis.com/compute/v1/projects/
> 
/zones/europe-west1-c/machineTypes/n1-standard-1)
> options({loginUser=admin, loginPrivateKeyPresent=true,
> scriptPresent=true, userMetadata={Name=jenkins-buildbox},
> networks=[support]}) May 19, 2017 6:57:50 PM 
org.jclouds.logging.jdk.JDKLogger logInfo
> INFO: >> adding node location(europe-west1-c) 
name(jenkins-buildbox-143) image(6874878162127463719) hardware(3001)
> May 19, 2017 6:57:50 PM org.jclouds.logging.jdk.JDKLogger logError
> SEVERE: createNodesInGroup(jenkins-buildbox), completed: 0/1, errors: 
1, rate: 586ms/op
> java.util.concurrent.ExecutionException: 
org.jclouds.http.HttpResponseException: command: POST 
https://www.googleapis.com/compute/v1/projects/
> 
/zones/europe-west1-c/instances
> HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: [{
> "error": {
> "errors": [
> {
> "domain": "global",
> "reason": "invalid",
> "message": "Invalid value for field 'resource.networkInterfaces[0]': 
''.
> Subnetwork should be specified for custom subnetmode network"
> }
> ],
> "code": 400,
> "message": "Invalid value for field 'resource.networkInterfaces[0]': 
''.
> Subnetwork should be specified for custom subnetmode network"
> }
> }
> ]
> at 
shaded.com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
> at 
shaded.com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
> at 
shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
> at 

Re: Problem spinning up instances on GCE with custom subnets

2017-05-24 Thread Fritz Elfert
FYI: In the meantime, Ignasi mentioned to me:
There is already https://issues.apache.org/jira/browse/JCLOUDS-1300
which also covers the same problem.

-Fritz

On 24.05.2017 00:19, Joshua Forest wrote:
> I need to be able to specify the subnetwork, is this possible in
> jclouds?  I am using the jclouds-plugin on jenkins.  Fritz Effert (the
> maintainer of that plugin) said he'd be watching the list and would
> respond if he saw something come through, so here it is! 
> 
> May 19, 2017 6:57:46 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Provisioning new jclouds node
> May 19, 2017 6:57:46 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Setting image id to https://www.googleapis.com/compute/v1/projects/
> 
> /global/images/
> May 19, 2017 6:57:46 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Setting hardware Id to 
> https://www.googleapis.com/compute/v1/projects/
> 
> /zones/europe-west1-c/machineTypes/n1-standard-1
> May 19, 2017 6:57:46 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Setting location Id to europe-west1-c
> May 19, 2017 6:57:46 PM org.jclouds.logging.jdk.JDKLogger logInfo
> INFO: >> searching 
> params({imageId=https://www.googleapis.com/compute/v1/projects/
> 
> /global/images/,
> locationId=europe-west1-c,
> hardwareId=https://www.googleapis.com/compute/v1/projects/
> 
> /zones/europe-west1-c/machineTypes/n1-standard-1})
> May 19, 2017 6:57:49 PM org.jclouds.logging.jdk.JDKLogger logInfo
> INFO: << matched image(https://www.googleapis.com/compute/v1/projects/
> 
> /global/images/)
> hardware(https://www.googleapis.com/compute/v1/projects/
> 
> /zones/europe-west1-c/machineTypes/n1-standard-1)
> location(europe-west1-c) May 19, 2017 6:57:49 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Setting networks to support
> May 19, 2017 6:57:49 PM 
> jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate get
> INFO: Init script without private admin key. Falling back to jenkins user 
> credentials
> May 19, 2017 6:57:49 PM org.jclouds.logging.jdk.JDKLogger logInfo
> INFO: >> running 1 node group(jenkins-buildbox) location(europe-west1-c) 
> image(https://www.googleapis.com/compute/v1/projects/
> 
> /global/images/)
> hardwareProfile(https://www.googleapis.com/compute/v1/projects/
> 
> /zones/europe-west1-c/machineTypes/n1-standard-1)
> options({loginUser=admin, loginPrivateKeyPresent=true,
> scriptPresent=true, userMetadata={Name=jenkins-buildbox},
> networks=[support]}) May 19, 2017 6:57:50 PM 
> org.jclouds.logging.jdk.JDKLogger logInfo
> INFO: >> adding node location(europe-west1-c) name(jenkins-buildbox-143) 
> image(6874878162127463719) hardware(3001)
> May 19, 2017 6:57:50 PM org.jclouds.logging.jdk.JDKLogger logError
> SEVERE: createNodesInGroup(jenkins-buildbox), completed: 0/1, errors: 1, 
> rate: 586ms/op
> java.util.concurrent.ExecutionException: 
> org.jclouds.http.HttpResponseException: command: POST 
> https://www.googleapis.com/compute/v1/projects/
> 
> /zones/europe-west1-c/instances
> HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: [{
> "error": {
> "errors": [
> {
> "domain": "global",
> "reason": "invalid",
> "message": "Invalid value for field 'resource.networkInterfaces[0]': ''.
> Subnetwork should be specified for custom subnetmode network"
> }
> ],
> "code": 400,
> "message": "Invalid value for field 'resource.networkInterfaces[0]': ''.
> Subnetwork should be specified for custom subnetmode network"
> }
> }
> ]
> at 
> shaded.com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
> at 
> shaded.com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
> at 
> shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
> at org.jclouds.concurrent.FutureIterables$1.run(FutureIterables.java:123)
> 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.http.HttpResponseException: command: POST 
> https://www.googleapis.com/compute/v1/projects/
> 
>