Issue 1024:Not possible to create hvm Linux nodes on Amazon

This commit is contained in:
Adrian Cole 2012-07-17 23:03:25 -04:00
parent 6264dee999
commit 1ee26e4754
2 changed files with 4 additions and 11 deletions

View File

@ -133,10 +133,9 @@ public class EC2CreateNodesInGroupThenAddToSet implements CreateNodesInGroupThen
public Map<?, Future<Void>> execute(String group, int count, Template template, Set<NodeMetadata> goodNodes,
Map<NodeMetadata, Exception> badNodes, Multimap<NodeMetadata, CustomizationResponse> customizationResponses) {
Template mutableTemplate = templateBuilderProvider.get().imageId(template.getImage().getId()).fromTemplate(template)
.build();
Template mutableTemplate = template.clone();
Iterable<String> ips = allocateElasticIpsInRegion(count, template);
Iterable<String> ips = allocateElasticIpsInRegion(count, mutableTemplate);
Iterable<? extends RunningInstance> started = createKeyPairAndSecurityGroupsAsNeededThenRunInstances(group,
count, mutableTemplate);

View File

@ -95,9 +95,7 @@ public class EC2CreateNodesInGroupThenAddToSetTest {
strategy.autoAllocateElasticIps = true;
// setup expectations
expect(templateBuilder.imageId(region + "/" + imageId)).andReturn(templateBuilder);
expect(templateBuilder.fromTemplate(input.template)).andReturn(templateBuilder);
expect(templateBuilder.build()).andReturn(input.template);
expect(input.template.clone()).andReturn(input.template);
expect(strategy.client.getInstanceServices()).andReturn(instanceClient).atLeastOnce();
expect(
strategy.createKeyPairAndSecurityGroupsAsNeededAndReturncustomize
@ -106,7 +104,6 @@ public class EC2CreateNodesInGroupThenAddToSetTest {
expect(input.template.getLocation()).andReturn(input.location).atLeastOnce();
expect(input.template.getImage()).andReturn(input.image).atLeastOnce();
expect(input.image.getId()).andReturn(region + "/" + imageId).atLeastOnce();
expect(input.image.getProviderId()).andReturn(imageId).atLeastOnce();
// differences when ip allocation
@ -204,16 +201,13 @@ public class EC2CreateNodesInGroupThenAddToSetTest {
"reservationId");
// setup expectations
expect(templateBuilder.imageId(region + "/" + imageId)).andReturn(templateBuilder);
expect(templateBuilder.fromTemplate(input.template)).andReturn(templateBuilder);
expect(templateBuilder.build()).andReturn(input.template);
expect(input.template.clone()).andReturn(input.template);
expect(strategy.client.getInstanceServices()).andReturn(instanceClient).atLeastOnce();
expect(
strategy.createKeyPairAndSecurityGroupsAsNeededAndReturncustomize
.execute(region, input.tag, input.template)).andReturn(ec2Options);
expect(input.template.getLocation()).andReturn(input.location).atLeastOnce();
expect(input.template.getImage()).andReturn(input.image).atLeastOnce();
expect(input.image.getId()).andReturn(region + "/" + imageId).atLeastOnce();
expect(input.image.getProviderId()).andReturn(imageId).atLeastOnce();
expect(instanceClient.runInstancesInRegion(region, zone, imageId, 1, input.count, ec2Options)).andReturn(
Reservation.class.cast(reservation));