Skip to content

Commit

Permalink
Log EC2 errors while calling RunInstances for reserved capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mmansour committed Jan 7, 2025
1 parent e8aedb7 commit 80cae4a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/hudson/plugins/ec2/SlaveTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,12 @@ private List<EC2AbstractSlave> provisionOndemand(
}
}
} else {
newInstances = ec2.runInstances(riRequest).getReservation().getInstances();
try {
newInstances = ec2.runInstances(riRequest).getReservation().getInstances();
} catch (AmazonEC2Exception e) {
logProvisionInfo("Error while trying to run instances for reserved capacity: " + e.getMessage());
throw e;
}
}
// Have to create a new instance

Expand Down

0 comments on commit 80cae4a

Please sign in to comment.