[
https://issues.apache.org/jira/browse/WHIRR-416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145898#comment-13145898
]
Andrei Savu commented on WHIRR-416:
-----------------------------------
I'm unable to get this to work as documented. If I set jclouds.ec.ami-query=""
I get:
{noformat}
Exception in thread "main" java.util.NoSuchElementException:
imageId(us-east-1/ami-1b814f72) not found
at
org.jclouds.compute.domain.internal.TemplateBuilderImpl.build(TemplateBuilderImpl.java:567)
at
org.apache.whirr.compute.BootstrapTemplate.build(BootstrapTemplate.java:75)
at
org.apache.whirr.actions.BootstrapClusterAction.doAction(BootstrapClusterAction.java:100)
at
org.apache.whirr.actions.ScriptBasedClusterAction.execute(ScriptBasedClusterAction.java:107)
at
org.apache.whirr.ClusterController.launchCluster(ClusterController.java:106)
at
org.apache.whirr.cli.command.LaunchClusterCommand.run(LaunchClusterCommand.java:62)
at org.apache.whirr.cli.Main.run(Main.java:64)
at org.apache.whirr.cli.Main.main(Main.java:97)
{noformat}
Tried with Ubuntu 10.04 in us-east-1 by Canonical and Amazon Linux also in
us-east-1.
This is the change I've made in ClusterSpec:
{noformat}
public void setImageId(String imageId) {
this.imageId = imageId;
+
+ // Amazon specific optimization to avoid running queries across
+ // all regions when the image-id is known from the property file
+
+ if ("aws-ec2".equals(getProvider())) {
+ config.setProperty(AWSEC2Constants.PROPERTY_EC2_AMI_QUERY, "");
+ }
}
{noformat}
> Enable lazy image fetching when the image-id is known
> -----------------------------------------------------
>
> Key: WHIRR-416
> URL: https://issues.apache.org/jira/browse/WHIRR-416
> Project: Whirr
> Issue Type: Improvement
> Components: core
> Reporter: Andrei Savu
> Assignee: Andrei Savu
> Fix For: 0.7.0
>
>
> "By default, the ComputeService will prefetch images from Alestic, Canonical,
> and RightScale. This allows you to query the images, which is great, if you
> don't know what you are looking for. However, if you already know the imageId
> you want, this is wasteful. We now provide the option to lazy-fetch images,
> which speed-ups execution."
> http://www.jclouds.org/documentation/userguide/using-ec2
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira