Eugen Paraschiv
unread,Apr 20, 2012, 7:46:48 AM4/20/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jcl...@googlegroups.com
Hi,
I am trying to recover from a failing createNodesInGroup operation. The operation is throwing an InvalidCacheLoadException but the node still gets created on EC2.
So my question is - shouldn't the create operation be transactional? My thinking is that the operation should either check everything it needs to check before performing the actual create node against the cloud API, or that it should at least rollback/destroy the creation of the new node. Or, at the very least, allow the client to do so - meaning the client should somehow have access to the node metadata of the newly created node (since it was created) so that I can destroy it manually.
The way the API works now, the client ends up with an exception (so no node metadata) and a created node.
Is there any way to deal with this better, or something I'm missing? Should I open an issue to track this?
I'm using jclouds 1.5.0-alpha.4.
Thanks.
Eugen.
The reason it's failing (not hugely important for this question):
template.getOptions().as(EC2TemplateOptions.class).securityGroups("launchpad_sec_group").noKeyPair();
is resulting in:
com.google.common.cache.CacheLoader$InvalidCacheLoadException: CacheLoader returned null for key [region=us-east-1, availabilityZone=us-east-1c, instanceId=i-6c5b250b, instanceState=pending, instanceType=m1.small, virtualizationType=paravirtual, imageId=ami-64a27a0d, ipAddress=null, dnsName=null, privateIpAddress=null, privateDnsName=null, keyName=null, platform=null, launchTime=Fri Apr 20 14:34:18 EEST 2012, rootDeviceName=/dev/sda1, rootDeviceType=ebs, ebsBlockDevices={}, monitoringState=disabled, placementGroup=null, productCodes=[], spotInstanceRequestId=null, subnetId=null, hypervisor=xen, vpcId=null, tags={}].
at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2386)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2354)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2316)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2231)
at com.google.common.cache.LocalCache.get(LocalCache.java:3971)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3975)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4845)
at com.google.common.cache.LocalCache$LocalManualCache.getUnchecked(LocalCache.java:4850)
at com.google.common.cache.LocalCache$LocalManualCache.apply(LocalCache.java:4857)
at org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.populateCredentials(EC2CreateNodesInGroupThenAddToSet.java:162)
at org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.execute(EC2CreateNodesInGroupThenAddToSet.java:150)
at org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:200)
at org.jclouds.aws.ec2.compute.AWSEC2ComputeService.createNodesInGroup(AWSEC2ComputeService.java:130)
at org.rest.cloud.CloudTemplate.createNode(CloudTemplate.java:53)