You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Nelson Araujo (JIRA)" <ji...@apache.org> on 2016/06/21 19:02:57 UTC
[jira] [Commented] (JCLOUDS-1121) Unable to specify non-default
zone when creating GCE template
[ https://issues.apache.org/jira/browse/JCLOUDS-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15342468#comment-15342468 ]
Nelson Araujo commented on JCLOUDS-1121:
----------------------------------------
I started looking into it.
> Unable to specify non-default zone when creating GCE template
> -------------------------------------------------------------
>
> Key: JCLOUDS-1121
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1121
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-labs-google
> Affects Versions: 1.9.2
> Reporter: Erin Collins
>
> I'm having trouble when specifying a GCE zone to provision new instances.
> We have these paramaters set in our GCE project metadata in the google console:
> {noformat}
> google-compute-default-region: us-central1
> google-compute-default-zone: us-central1-a
> {noformat}
> (as described here: https://cloud.google.com/compute/docs/gcloud-compute/#default-properties)
> To provision an instance, we create a template like the following. However, when I specify 'us-central1-f' for the zone, the template defaults back to 'us-central1-a'.
> {code}
> def context = ContextBuilder.newBuilder(new GoogleComputeEngineProviderMetadata())
> .credentials(identity, credential)
> .overrides(overrides)
> .modules(getModules())
> .buildView(ComputeServiceContext.class)
> ComputeService computeSvc = ctx().getComputeService()
> TemplateBuilder templateBuilder = computeSvc.templateBuilder()
> templateBuilder.locationId('us-central1-f') <- When this returns, the zone in the templateBuilder object actually points to us-central1-a
> {code}
> So, I'm assuming jclouds is picking up the default zone from the metadata?
> As a workaround for now, I believe I can just change our default zone in the metadata and move our new provisioning over to us-central1-f, but that won't allow us to give users the option of provisioning in a specific zone other than the default one.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)