Skip to content

Commit

Permalink
Update log message from EC2 RunInstances call to include number of no…
Browse files Browse the repository at this point in the history
…des requested (#1033)

* Log EC2 errors while calling RunInstances for reserved capacity

* Update log message to include number of nodes requested
  • Loading branch information
sfc-gh-mmansour authored Jan 10, 2025
1 parent 3bc68a3 commit 5263995
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/hudson/plugins/ec2/SlaveTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -2032,7 +2032,9 @@ private List<EC2AbstractSlave> provisionOndemand(
try {
newInstances = ec2.runInstances(riRequest).getReservation().getInstances();
} catch (AmazonEC2Exception e) {
logProvisionInfo("Error while trying to run instances for reserved capacity: " + e.getMessage());
logProvisionInfo("Jenkins attempted to reserve "
+ riRequest.getMaxCount()
+ " instances and received this EC2 exception: " + e.getMessage());
throw e;
}
}
Expand Down

0 comments on commit 5263995

Please sign in to comment.