Skip to content

Commit

Permalink
Fix Check for number of low priority nodes in Azure Batch before rais…
Browse files Browse the repository at this point in the history
…ing a pool resize error (#5576)


Signed-off-by: Adam Talbot <[email protected]>
Co-authored-by: Chris Hakkaart <[email protected]>
  • Loading branch information
adamrtalbot and christopher-hakkaart authored Feb 4, 2025
1 parent ba171fd commit 9b528c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ class AzBatchService implements Closeable {
if( pool.state != BatchPoolState.ACTIVE ) {
throw new IllegalStateException("Azure Batch pool '${pool.id}' not in active state")
}
else if ( pool.resizeErrors && pool.currentDedicatedNodes==0 ) {
throw new IllegalStateException("Azure Batch pool '${pool.id}' has resize errors")
else if ( pool.resizeErrors && pool.currentDedicatedNodes==0 && pool.currentLowPriorityNodes==0 ) {
throw new IllegalStateException("Azure Batch pool '${pool.id}' has resize errors and no agents are available")
}
if( pool.taskSlotsPerNode != spec.vmType.numberOfCores ) {
throw new IllegalStateException("Azure Batch pool '${pool.id}' slots per node does not match the VM num cores (slots: ${pool.taskSlotsPerNode}, cores: ${spec.vmType.numberOfCores})")
Expand Down

0 comments on commit 9b528c1

Please sign in to comment.